Closed SuperMartijn642 closed 3 years ago
I have the same issue. As solution until the bug is fixed I have declared the dependency only with compileOnly
and added the mod file in /run/mods manually. If I do runtimeOnly
or implementation
additionally, it didn't worked, so I think the classes of the dependency where loaded in runtime but not as mod.
That doesn't work because the mods in /run/mods don't get deobfuscated while the dev environment is deobfuscated.
This is not a ForgeGradle issue. Forge 1.17 is currently missing the ClasspathLocator class which was present in 1.16 which loaded mods off the classpath.
Versions:
Issue:
Any mods I add as dependencies using
runtimeOnly
orimplementation
in my buid.gradle won't load at runtime. Both usingcompileOnly
andimplementation
, the dependencies are present for compilation. So far I've tried different FG versions, different Forge versions, invalidating caches in IntelliJ, regenerating run configurations, and adding the dependencies using a local flatDir repository.I've also tried using
Class.forName
in my mod's constructor to see if classes from the dependencies were present. Sadly not, although that might be due to it being too early in the loading phase.build.gradle file: https://gist.github.com/SuperMartijn642/40843d2e54dfc1dcde746315668056d6
Gradle import log: https://gist.github.com/SuperMartijn642/a865b7fe5be16b173f60ebc5ea5926ac
latest.log: https://gist.github.com/SuperMartijn642/a0ebc6e7b85c74d712d4becf9c279373