MinecraftForge / ForgeGradle

Minecraft mod development framework used by Forge and FML for the gradle build system
GNU Lesser General Public License v2.1
508 stars 437 forks source link

Support Gradle 8 #908

Closed gmitch215 closed 1 year ago

gmitch215 commented 1 year ago

Hello,

The newer versions of shadowJar require Gradle 8.0+ and above, and the latest versions of ForgeGradle don't support that yet.

Are there any plans to support it in the future?

gigaherz commented 1 year ago

Yes, we always plan on supporting the latest version of gradle, as soon as we can. But this will probably not happen until after ForgeGradle 6. Meanwhile, use an older version of the shadow plugin, corresponding to the version of gradle you use.

gmitch215 commented 1 year ago

Ok, thanks!

Is there any ETA for when this plans to happen?

gigaherz commented 1 year ago

No this project has a very small team of volunteers working in their spare time, we don't like to give ETAs that may not happen.

gmitch215 commented 1 year ago

Ok, thanks though.

BillyGalbreath commented 1 year ago

I was about to drop Forge support in my project(s) because everything else is starting to upgrade to newer and better things, but then someone pointed out a system property exists.

Just add this to your gradle.properties file

systemProp.net.minecraftforge.gradle.check.gradle=false

This will disable ForgeGradle from stopping you from using Gradle 8 ;)

JasperTheMinecraftDev commented 1 year ago

I was about to drop Forge support in my project(s) because everything else is starting to upgrade to newer and better things, but then someone pointed out a system property exists.

Just add this to your gradle.properties file

systemProp.net.minecraftforge.gradle.check.gradle=false

This will disable ForgeGradle from stopping you from using Gradle 8 ;)

Why is this marked as off-topic? It clearly isn't.

gigaherz commented 1 year ago

Due to limitations in Gradle itself, ForgeGradle has to rely on internals in order to do its job. These internals tend to change, specially in major versions. We decided during development of FG 4 that each FG release would only support one major version, so that we can limit the number of conditional workarounds we need to have in the code. Disabling these checks may work if you are lucky, but more likely it will break, in more or less subtle ways. So we cannot provide support for bypassing the version check. Moreover, we always recomment running ForgeGradle via the gradle-wrapper system and the gradlew scripts, which means you don't need to have any version of gradle installed system-wide, and each project can launch a different version of gradle from the gradle version cache, which is automatically managed by gradle-wrapper. So there's no reason to force ForgeGradle to run on Gradle 8. Marking it as offtopic isn't semantically ideal, but allows the post to remain available, but hidden.

[EDIT: typo]

SizableShrimp commented 1 year ago

Completed in ForgeGradle 6.