Witixin1512 / GeckoLib-MultiLoader-Template

A MultiLoader template for compiling with GeckoLib included in your dev env!
Creative Commons Zero v1.0 Universal
5 stars 1 forks source link

Circular dependency between tasks #1

Closed DAQEM closed 1 year ago

DAQEM commented 1 year ago

Syncing and building the projects works just fine, but when I try to run a client (Fabric, Forge or Quilt), I get the following error:

3:42:56 PM: Executing ':Quilt:classes'...

> Configure project :Common
Quilt Loom: 0.12.40

> Configure project :Fabric
Fabric Loom: 0.12.56

> Configure project :Quilt
Quilt Loom: 0.12.40

FAILURE: Build failed with an exception.

* What went wrong:
Circular dependency between the following tasks:
:Common:prepareRemapJar
\--- :Quilt:jar
     \--- :Quilt:classes
          \--- :Quilt:compileJava
               \--- :Common:remapJar
                    \--- :Common:prepareRemapJar (*)

(*) - details omitted (listed previously)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 5s

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4.2/userguide/command_line_interface.html#sec:command_line_warnings
3:43:01 PM: Execution finished ':Quilt:classes'.

Full debug log: https://gist.github.com/DAQEM/d4b7e985972fcec4d3f1259980336152

How to reproduce:

DAQEM commented 1 year ago

Removing compileOnly project(":Common") from the Quilt build.gradle fixed the issue for me. Everything seems to work just fine. Syncing, Building and running a client.

I don't have that much knowledge of Gradle and multiloader setups, but I don't think this is the best way to fix it. Any ideas how to fix it with a different solution?

Witixin1512 commented 1 year ago

I can't replicate this on my side. I downloaded the repo, imported into IntelliJ, set the project sdk to 17 as well as configured gradle to use that, refreshed again, genIntelliJ runs and both Forge and Fabric ran fine. If you remove compileOnly project(":Common") from the Quilt build.gradle you should stop having access to Common classes in the Quilt module... so no, that shouldn't be a great solution...

DAQEM commented 1 year ago

Yeah that's exactly what I did as well. Very strange. Thanks for checking tho. I'll let you know when I find the solution.

Witixin1512 commented 1 year ago

https://github.com/jaredlll08/MultiLoader-Template/issues/17 I've seen other people get this but haven't been able to encounter it myself, maybe applying that fixes it? I'm thinking of probably switching the common module to VanillaGradle since loom in common comes with quite a bit of issues in a ML Environment. I'm starting to think that having parchment is not that worth it.