build: proguard works without multi-release.

This commit is contained in:
huanghongxun
2021-10-18 03:02:57 +08:00
parent f8cf3c22a1
commit 23a805d576
3 changed files with 17 additions and 9 deletions

View File

@@ -170,16 +170,22 @@ task proguard(type: proguard.gradle.ProGuardTask) {
outjars "${buildDir}/libs/${project.name}-${project.version}-proguard.jar"
dontobfuscate
dontoptimize
dontpreverify
printusage
keep 'public class org.jackhuang.** { *; }'
keepclassmembers 'public class org.jackhuang.** { *; }'
keep 'public class com.jfoenix.** { *; }'
keepclassmembers 'public class com.jfoenix.** { *; }'
keep 'class org.jackhuang.** { *; }'
keep 'class com.jfoenix.** { *; }'
keep 'class com.google.gson.** { *; }'
keep 'class com.github.steveice10.opennbt.** { *; }' // TagRegistry use reflection to create object instance
keep 'class * extends com.google.gson.TypeAdapter'
keep 'class * implements com.google.gson.TypeAdapterFactory'
keep 'class * implements com.google.gson.JsonSerializer'
keep 'class * implements com.google.gson.JsonDeserializer'
printusage "${buildDir}/libs/proguard-shrinking-details.txt"
System.out.println(new File(".").absolutePath)
dontwarn 'com.nqzero.**'
dontwarn 'org.slf4j.**'
@@ -194,6 +200,8 @@ task proguard(type: proguard.gradle.ProGuardTask) {
libraryjars files(configurations.compileClasspath.collect())
keepattributes 'SourceFile,LineNumberTable'
keepattributes '*Annotation*'
keepattributes 'Signature'
var javaHome = System.getProperty('java.home')

View File

@@ -400,7 +400,6 @@ public final class VersionSettingsPage extends StackPane implements DecoratorPag
txtServerIP = new JFXTextField();
txtServerIP.setPromptText(i18n("settings.advanced.server_ip.prompt"));
txtServerIP.getStyleClass().add("fit-width");
FXUtils.setLimitWidth(txtServerIP, 300);
serverPane.addRow(0, new Label(i18n("settings.advanced.server_ip")), txtServerIP);
}

View File

@@ -743,7 +743,7 @@
-fx-font-weight: BOLD;
-fx-prompt-text-fill: #808080;
-fx-alignment: top-left;
-fx-pref-width: 300.0;
-fx-max-width: 1000000000;
-jfx-focus-color: -fx-base-check-color;
-fx-padding: 8;
-jfx-unfocus-color: transparent;
@@ -1214,6 +1214,7 @@
-jfx-unfocus-color: transparent;
-fx-background-color: #f1f3f4;
-fx-padding: 4;
-fx-max-width: 1000000000;
}
.jfx-combo-box-warning {