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 caching for some parts of FG #923

Closed PaintNinja closed 1 year ago

PaintNinja commented 1 year ago

This PR adds support for Gradle caching in some parts of FG, mainly focused towards userdev AT applying.

To test this PR:

  1. Publish this to local maven and use it in the MDK
  2. Enable caching in the MDK's gradle.properties with org.gradle.caching=true
  3. Add an AT the MDK and build the mod
  4. Change the AT and build it again
  5. Change the AT back to exactly what it was in step 3 and build again

To compare performance with and without this PR:

Known limitations:

PaintNinja commented 1 year ago

Baseline (without this PR, caching not enabled): https://scans.gradle.com/s/oakl6gsps6iti (1m 7s) With this PR (when getting a cache hit): https://scans.gradle.com/s/p2jeystmnwjlq (33s)