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

paperweight-userdev v2 fails to build multi-module project #275

Closed
NichtStudioCode opened this issue Dec 26, 2024 · 0 comments · Fixed by #276
Closed

paperweight-userdev v2 fails to build multi-module project #275

NichtStudioCode opened this issue Dec 26, 2024 · 0 comments · Fixed by #276

Comments

@NichtStudioCode
Copy link

NichtStudioCode commented Dec 26, 2024

The following error occurs when trying to build a multi-module project that uses paperweight-userdev v2.0.0-beta.8:

A problem was found with the configuration of task ':moduleB:compileJava' (type 'JavaCompile').
  - Gradle detected a problem with the following location: 'C:\Users\user\.gradle\caches\paperweight-userdev\613081b689735a1c6be92857491be1a4773c6b9c71a65baf922ee4f718c54ed2\module\io.papermc.paper\dev-bundle\1.21.4-R0.1-SNAPSHOT\paperweight\setupCache\patchedSources.jar'.
    
    Reason: Task ':moduleB:compileJava' uses this output of task ':moduleA:paperweightUserdevSetup' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':moduleA:paperweightUserdevSetup' as an input of ':moduleB:compileJava'.
      2. Declare an explicit dependency on ':moduleA:paperweightUserdevSetup' from ':moduleB:compileJava' using Task#dependsOn.
      3. Declare an explicit dependency on ':moduleA:paperweightUserdevSetup' from ':moduleB:compileJava' using Task#mustRunAfter.

I have created a sample repository to reproduce this issue here: https://github.com/NichtStudioCode/paperweight-userdev2-multimodule (Run gradle build)

This issue does not occur when using userdev v1.
This also occurs on 2.0.0-SNAPSHOT.
Interestingly, this also happens when shared caches are disabled via -Ppaperweight.sharedCaches=false (Though I am not sure whether that disables shared caches entirely or just the machine-wide one)

@jpenilla jpenilla linked a pull request Dec 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant