mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-12 13:26:53 -04:00
build: WIP: make proguard work.
This commit is contained in:
parent
50cff0bcba
commit
9695ddf8de
@ -173,8 +173,13 @@ task proguard(type: proguard.gradle.ProGuardTask) {
|
||||
|
||||
dontobfuscate
|
||||
dontoptimize
|
||||
keep 'public class org.jackhuang.**'
|
||||
keep 'public class org.slf4j.**'
|
||||
dontpreverify
|
||||
printusage
|
||||
|
||||
keep 'public class org.jackhuang.** { *; }'
|
||||
keepclassmembers 'public class org.jackhuang.** { *; }'
|
||||
keep 'public class com.jfoenix.** { *; }'
|
||||
keepclassmembers 'public class com.jfoenix.** { *; }'
|
||||
|
||||
dontwarn 'com.nqzero.**'
|
||||
dontwarn 'org.slf4j.**'
|
||||
@ -198,7 +203,6 @@ task proguard(type: proguard.gradle.ProGuardTask) {
|
||||
libraryjars "${javaHome}/lib/rt.jar"
|
||||
libraryjars "${javaHome}/lib/ext/jfxrt.jar"
|
||||
} else {
|
||||
System.out.println(configurations.compileClasspath.collect())
|
||||
// As of Java 9, the runtime classes are packaged in modular jmod files.
|
||||
libraryjars "${javaHome}/jmods/java.base.jmod", jarfilter: '!**.jar', filter: '!module-info.class'
|
||||
libraryjars "${javaHome}/jmods/java.desktop.jmod", jarfilter: '!**.jar', filter: '!module-info.class'
|
||||
|
@ -152,7 +152,7 @@ public final class DownloadProviders {
|
||||
} else if (exception.getCause() instanceof FileNotFoundException) {
|
||||
return i18n("download.code.404", url);
|
||||
} else if (exception.getCause() instanceof AccessDeniedException) {
|
||||
return i18n("install.failed.downloading.access_denied", url, ((AccessDeniedException) exception.getCause()).getFile());
|
||||
return i18n("install.failed.downloading.detail", url) + "\n" + i18n("exception.access_denied", ((AccessDeniedException) exception.getCause()).getFile());
|
||||
} else {
|
||||
return i18n("install.failed.downloading.detail", url) + "\n" + StringUtils.getStackTrace(exception.getCause());
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ import org.jackhuang.hmcl.util.javafx.BindingMapping;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.logging.Level;
|
||||
|
||||
@ -55,7 +56,7 @@ public class Theme {
|
||||
|
||||
Theme(String name, String color) {
|
||||
this.name = name;
|
||||
this.color = color;
|
||||
this.color = Objects.requireNonNull(color);
|
||||
this.paint = Color.web(color);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user