Version 1.6 broke multi module builds
crschnick opened this issue · 3 comments
When upgrading to 1.6 or above, I always encounter the following error when building a multi-module project:
> Could not resolve all files for configuration ':app:runtimeClasspath'.
> Failed to transform xpipe-beacon.jar (project :beacon) to match attributes {artifactType=jar, javaModule=true, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.version=21, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for ExtraJavaModuleInfoTransform: C:\Projects\xpipe\xpipex\beacon\build\libs\xpipe-beacon-8.0-SNAPSHOT.jar.
> Transform output C:\Projects\xpipe\xpipex\beacon\build\libs\xpipe-beacon-8.0-SNAPSHOT.jar must exist.
> Failed to transform xpipe-core.jar (project :core) to match attributes {artifactType=jar, javaModule=true, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.version=21, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for ExtraJavaModuleInfoTransform: C:\Projects\xpipe\xpipex\core\build\libs\xpipe-core-8.0-SNAPSHOT.jar.
> Transform output C:\Projects\xpipe\xpipex\core\build\libs\xpipe-core-8.0-SNAPSHOT.jar must exist.
The dependency setup of :app
looks like this:
dependencies {
implementation project(':core')
implementation project(':beacon')
It works with 1.5, so this is probably related to #78
Yes this is very likely related to #78. Unfortunately, the timing of transformations is still a general Gradle issue. By certain (miss) configuration they are triggered too early and then things are in a bad state.
Here is one example of how this can happen: GradleUp/shadow#882
In your case, it could be another plugin causing the problem or something in your build configuration.
I still think the change mad to resolve #78 is "right", as it previously just masked another problem in the setup.
If you could share a reproducer of the issue, I am happy to take a look though.
So this is now also fixed by avoiding any early calls to the runtimeClasspath.
It would be nice if the error messages could provide more detail here as well.