Open Jonathing opened 1 year ago
This seems to be a ForgeGradle problem. ForgeGradle accesses the toolchain version directly in their task constructors instead of using a provider. The ClasspathExec
task works fine and allows the toolchain version to be changed after it has been constructed.
See: https://github.com/MinecraftForge/ForgeGradle/blob/FG_6.0/src/common/java/net/minecraftforge/gradle/common/tasks/JarExec.java#L83-L86 https://github.com/MinecraftForge/ForgeGradle/blob/FG_6.0/src/common/java/net/minecraftforge/gradle/common/tasks/ExtractRangeMap.java#L30-L37
Probably due to how a
ClasspathExec
task gets the java launcher convention during initialization, and that type of task is created when this plugin is applied. Not sure if it is really an issue, but I've decided to report it as such.I've worked around it with my Plugin DSL setup by doing this:
If you're curious, here's my
settings.gradle
setup:Gradle 8.1.1
ForgeGradle 6.0.11
ModGradle 4.0.4