MinecraftForge / ForgeGradle

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

Major cleanup, use Gradle properties and providers #794

Closed sciwhiz12 closed 3 years ago

sciwhiz12 commented 3 years ago

This PR does a major cleanup of ForgeGradle tasks and plugins. The list of changes are too numerous to individually list out (you can read the commits to see all changes), so here are the two three key and most notable points:

Buildscripts for user development (using the net.minecraftforge.gradle plugin) may need adjustments if they are manually adjusting tasks. Testing with a fresh MDK for 1.16.5 reveals no changes necessary (other than the required Gradle update and changing the ForgeGradle version).

Buildscripts for the Forge development workspace (the MinecraftForge repository) require more extensive changes. For reference, my fork's fg5 branch shows the changes needed for ForgeGradle 5 from this PR to run. To run the branch, clone this branch to an adjacent directory to the repository folder named ForgeGradle.

As of writing this description, this PR is marked as a draft due to insufficient testing (due to my insufficient hardware). /cc @SizableShrimp pls test this PR as you promised me twice

LexManos commented 3 years ago

Just a note, this is the major thing pending before a RB/No more breaking changes in FG5. We wanted to make sure we updated the modern gradle concepts to make the lifecycle of FG5/G7 consistent. So if people could test this and give feedback that'd be great.

SizableShrimp commented 3 years ago

Just a note, this is the major thing pending before a RB/No more breaking changes in FG5. We wanted to make sure we updated the modern gradle concepts to make the lifecycle of FG5/G7 consistent. So if people could test this and give feedback that'd be great.

Some preliminary testing shows it works with Forgedev for 1.17 and Userdev for both 1.16 and 1.17. Should be ready for review & merge. Since this is mostly just gradle updates to use more modern features, it shouldn't break or change much in terms of functionality. However, the more testing, the better. If anyone would like to test this still before it is merged and doesn't want to go through the trouble of cloning this locally, you can use my maven https://sizableshrimp.me/maven with a Group ID of me.sizableshrimp.gradlecleanup to test (FG5 only).