我正在努力处理JavaFX应用程序的混淆问题。以该项目为基础:
https://github.com/openjfx/samples/tree/master/IDE/IntelliJ/Non-Modular/Gradle
Proguard抛出此错误:
java.io.IOException: Can't write [Path\infile.jar] (Can't read [Path\outfile.jar] (Duplicate jar entry [a.class]))
Run Code Online (Sandbox Code Playgroud)
Proguard配置文件:-dontoptimize -dontshrink
-libraryjars 'E:\Prog\jdk-11.0.2\jmods'
-libraryjars 'E:\Prog\javafx-sdk\lib'
# Save meta-data for stack traces
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable
# Rename FXML files together with related views
-adaptresourcefilenames **.fxml,**.png,**.css
-adaptresourcefilecontents **.fxml
-adaptclassstrings
# Keep all annotations and meta-data
-keepattributes *Annotation*,Signature,EnclosingMethod
# Keep entry-point class
-keep classpackage.App {
public static void main(java.lang.String[]);
}
# Keep all classes inside application
-keep,allowobfuscation class package.** {
}
# Keep names of fields marked …Run Code Online (Sandbox Code Playgroud)