From 57e686a17c7511cad281d611ec2c696333921fb7 Mon Sep 17 00:00:00 2001 From: bconlon <67203206+bconlon1@users.noreply.github.com> Date: Tue, 18 Jun 2024 17:49:37 -0700 Subject: [PATCH] build: machete optimization (#2196) based on #2014 --- build.gradle | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/build.gradle b/build.gradle index db5413cdad..70d57236ed 100644 --- a/build.gradle +++ b/build.gradle @@ -7,6 +7,7 @@ plugins { id 'io.github.0ffz.github-packages' version '[1,2)' id 'com.matthewprenger.cursegradle' version '[1.4,1.5)' id 'com.modrinth.minotaur' version '[2,3)' + id "io.github.p03w.machete" version "2.0.1" } version = "${mc_version}-${mod_version}-neoforge" @@ -51,6 +52,10 @@ sourceSets.main.resources { srcDir 'src/generated/resources' } +processResources { + exclude '.cache/' +} + dependencies { implementation "net.neoforged:neoforge:${project.neoforge_version}" @@ -121,6 +126,21 @@ repositories { mavenLocal() } +machete { + additionalTasks.add("jarJar") + + png.enabled = true + png.alpha = true + png.expectReunpack = true + + json.enabled = true + + jij.enabled = true + + lvtStriping.enabled = true + sourceFileStriping.enabled = true +} + tasks.named('jar', Jar).configure { manifest { attributes([