Open rolandas-karosas opened 1 month ago
Arguments are passed here https://github.com/wvengen/proguard-maven-plugin/blob/master/src/main/java/com/github/wvengen/maven/proguard/ProGuardMojo.java#L1037 It should be relatively easy to pass file.encoding on
Arguments are passed here https://github.com/wvengen/proguard-maven-plugin/blob/master/src/main/java/com/github/wvengen/maven/proguard/ProGuardMojo.java#L1037 It should be relatively easy to pass file.encoding on
These are main class arguments? Not the jvm args for java fork. I get proguard.ParseException: Unknown option https://github.com/Guardsquare/proguard/blob/master/base/src/main/java/proguard/ConfigurationParser.java#L169
Yes, you cannot pass it via that directly, but using https://ant.apache.org/manual/api/org/apache/tools/ant/taskdefs/Java.html#createJvmarg()
But it should be done in similar place.
after obfuscation resource file(s) become corrupted (UTF-8 encoding is lost)
OS name: "windows 11" Java 8 Maven 3.9.7
plugin configuration:
proguard.conf: -dontshrink -dontoptimize -adaptresourcefilecontents META-INF/**.tld
All my resource files are correct with UTF-8 encoding.
Need to pass JVM argument -Dfile.encoding=UTF-8 to the forked java process. (same as passing maxMemory)
I checked directly executing proguard.jar. With argument -Dfile.encoding=UTF-8 resource files are good. Without argument -Dfile.encoding=UTF-8 I also get corrupted resource files.
P.S. other maven plugins (surefire plugin, failsafe plugin) have argLine argument for passing JVM options to the forked java process