Compiling TFM with Gradle

Please Note: The TotalFreedom Forum has now been put into a read-only mode. Total Freedom has now closed down and will not be returning in any way, shape or form. It has been a pleasure to lead this community and I wish you all the best for your futures.
  • https://github.com/StevenNL2000Freedom/TotalFreedomMod

    So I got TFM working with Gradle. It's significantly faster in every way.
    It takes less than 2 minutes to get a JAR compared to the 15 minutes you could spend with Maven on a clean slate.

    It usually takes at least a minute to compile, with Gradle the maximum is 15 seconds. If you're balls deep in a debugging session, it takes more like 5 seconds.

    It's not done yet, and anyone who knows Gradle ### PLEASE FUCKING HELP ME GET THIS SHIT SORTED OUT

    Here's what's missing / the bugs

    • Potentially cross compatible versions of TFM? Different projects for NMS to ease transition to a newer version. You can get a JAR for 1.16.5 and 1.17 in the same build instead of having to be on an out of sync branch or changing the pom.xml (no idea how to do this)

    However, you can get a fully working JAR. Just run gradle build. Shading fully works and it's the exact same size as you would get from Maven.

  • This is pretty rad absolutely epic. It significantly cuts down the build time to 6 seconds. However, I should note that build.properties is not included in the plugin jar the first time you run the build task. Subsequent runs of the task, however, do include it.

    image.png

  • It's finished and it behaves almost exactly as Maven. Only difference is that there is simply no way to have a build number that increases by one every build. The only guides are for Android Studio or Gradle 2. There's literally nothing on the entire internet. I'm just using the commit count from Git. I know it's not the same but at least it's a number that updates. Other than that it behaves exactly the same as Maven, but it's much, much faster now