From f8ddd825ac3ae3f4ba7de3d99026beac7768a040 Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Wed, 14 Apr 2021 18:05:20 +0200 Subject: [PATCH] Optimize the shrinked jars and obfuscate them --- build.gradle.kts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 219e1eb..bc95602 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -33,13 +33,18 @@ subprojects { val shrinkJar = register("shrinkJar", proguard.gradle.ProGuardTask::class) { injars(this@tasks.getByName("remapJar")) outjars("$rootDir/shrinkedJars/") - keep("class fr.username404.snowygui.** { * ; }") + keep("class fr.username404.snowygui.mixins.* { * ; }") + keep("class fr.username404.snowygui.fabric.** { * ; }") + keep("class fr.username404.snowygui.forge.** { * ; }") keepattributes(); keepdirectories(); keeppackagenames(); keepparameternames() - adaptclassstrings(); adaptresourcefilecontents() + adaptclassstrings() dontwarn("fr.username404.**") dontwarn("java.**") // Needed for the current version of proguard // Note: dontpreverify() should NOT be used, it will cause errors at runtime - dontoptimize(); dontobfuscate() + useuniqueclassmembernames() + optimizations("method/inlining/*, code/allocation/variable, class/merging/vertical, code/removal/advanced, code/simplification/branch, code/merging") + optimizationpasses(4) + overloadaggressively() } if (this@subprojects.name != "common") build.get().finalizedBy(shrinkJar) }