Optimize the shrinked jars and obfuscate them
This commit is contained in:
parent
3af606ce79
commit
f8ddd825ac
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue