Closed mezz closed 2 years ago
It crashes because there are two different versions of ASM on the class path. The one causing the problem is a partial copy of ASM5 that is included in a library called json-smart. This library appears to be a transitive dependency of the git changelog plugin JEI uses.
Also you can use older version of FG3, you just need to explicitly specify which one instead of 3.+
Barteks that is not a solution if you try and run a forge version that needs side stripper on a fg that doesnt have it you'll get patch errors. We need to figure out why a transitive dependency is DOWNGRADING ASM.That sounds like a retarded gradle thing tondo.
Gradle doesn't really try to resolve such dependency conflicts. I think I was wrong here. It appears to be using the right asm version on my system even with JEI project
It should be possible to force specific version of asm manually, but this will break if FG ever updates ASM:
buildscript {
// ...
configurations.classpath.resolutionStrategy {
force("org.ow2.asm:asm-commons:6.2.1")
}
// ...
}
Yeah, trying to force the newer asm version isn't going to work in this case as gradle already thinks its using the newer version FG depends on. Either because it doesn't know this library shades an older version, or it just doesn't care. And, it just so happens that the class loader finds the shaded older version first.
There is potential good news though. The lasted version of json-smart no longer shades asm 5, so forcing that version of the library resolves the conflict (tested and works). Granted it's not an ideal solution.
Gradle line: force("net.minidev:json-smart:2.3")
We need to pull anything that fg has that uses asm out into external jars. If someone wants to do that I can make the repo and have you pr. But until I'm back in town its staying as is unless someone else addresses it.
Don't think this is still an issue.
I worked around this by putting the changelog plugin I use in its own separate subproject. It has all kinds of dependency incompatibilities with other gradle tooling.
This happens reliably in JEI when I set the Forge version to the latest (
28.0.45
) https://github.com/mezz/JustEnoughItems/blob/1.14/gradle.properties and then refresh the project.Crash log: https://gist.github.com/mezz/7cffd959f2c8b559f622fa4b8eddf72f