[GRADLE-3330] Fails to resolve multiple configurations of the same project when 'archiveName' is specified Created: 04/Aug/15 Updated: 15/Nov/15 Resolved: 04/Aug/15
|Affects Version/s:||2.5, 2.6, 2.7, 2.8, 2.9|
I have discovered an issue in the gradle 2.5 and 2.6-RC2 with multi-project builds. Or perhaps is a feature. smile Anyway, what works with gradle 2.3 and 2.4 does not work anymore with gradle 2.5+.
I have created a small project that can reproduce the issue. It consists of a root project with two-subprojects
The root project has only the settings.gradle file:
The core project has the following build.gradle:
The core sub-project produces two artifacts: the default animals.jar and the cats.jar from the cats configuration.
The petshop project build.gradle:
The petshop project requires for compilation both animals.jar and cats.jar. But it seems that gradle places just one of the dependencies in the class-path of the petshop project. Depending of the order of the dependencies, the build fails finding classes from the animal.jar or cats.jar.
|Comment by Sterling Greene [ 04/Aug/15 ]|
|Comment by Daz DeBoer [ 04/Aug/15 ]|
This issue appears when `archiveName` is used to configure the full name of the generated jar. It does not appear if the archive name is set via `baseName` or some other attribute on the `Jar` task.
|Comment by Daz DeBoer [ 15/Nov/15 ]|
Turns out this was not fixed properly in Gradle 2.7. Applying the 'base' plugin is required to reproduce the failure.
This is related to