Closed thomasglasser closed 6 months ago
Do you have any other Gradle plugins? It seems to be using GSON 2.9.1, but loom depends on 2.10.1. Running with --info might provide some details on where this is coming from.
This is what --info says about gson
(com.google.gson.Gson) with version (null) was loaded from (/C:/Users/tjgla/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson/2.9.1/2cc2131b98ebfb04e2b2c7dfb84431f4045096b/gson-2.9.1.jar)
Is this a project with multiple sub projects? I have a feeling this is the age old issue of Gradle not pulling in the correct versions of libraries.
If so all your plugin versions must be defined in the root build.gradle file with apply false
See: https://docs.gradle.org/current/userguide/plugins.html#sec:subprojects_plugins_dsl and https://github.com/FabricMC/fabric-loader/blob/master/build.gradle#L15
Doesnt have any subprojects. I tried putting id 'gson' version '2.10.+' apply false
but it can't find it
Downgrading to 1.4.6 fixes it so it's a 1.5 or above change
May be related to https://github.com/gradle/foojay-toolchains/pull/52
May be related to gradle/foojay-toolchains#52
Yes, quite possibly. @thomasglasser can you provide a project where this doesnt work. I dont think you mentioned if you had any other Gradle plugins or not?
I'm running into the same issue as well in https://github.com/KyoriPowered/adventure-platform-fabric/pull/125 -- jmp has a workaround in his foojay PR, I ended up doing this as an alternate workaround. Hopefully our Gradle friends will be able to put out a release soon to resolve this issue for now? The whole classloader hierarchy thing is very unfortunate.
Im going to close this as I dont think there is anything I can do to help with this, im also not going to let it block the 1.5 stable release.
I think this may be caused by having deps that don't use loom 1.5
Because my project with no deps works fine. The workaround seems to have fixed it
When refreshing my project recently, it fails with this log: https://paste.gg/p/anonymous/45026e85e656461fbfd6f09ef27127bf This started happening seemingly out of the blue and I've deleted and refreshed and cleared caches but I can't find the cause