Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.6 broke multi module builds #104

Closed
crschnick opened this issue Feb 8, 2024 · 3 comments
Closed

Version 1.6 broke multi module builds #104

crschnick opened this issue Feb 8, 2024 · 3 comments
Labels
question Further information is requested

Comments

@crschnick
Copy link

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

@jjohannes
Copy link
Member

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: johnrengelman/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.

@crschnick
Copy link
Author

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.

@jjohannes
Copy link
Member

Happy to hear that you were able to solved this in you setup. Follow up: #106

@jjohannes jjohannes added the question Further information is requested label Feb 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants