Open TioCoding opened 5 years ago
I don't have any experience with ProGuard, but maybe the ProGuard guys can answer this easier? :)
Please check my one year old proguard task in build.gradle. I believe it will help.
task proguard(type: ProGuardTask, dependsOn: 'shadowJar') {
injars "${buildDir}/libs/${project.tasks.shadowJar.archiveName}"
outjars "${buildDir}/libs/dist.jar"
libraryjars 'c:/Program Files/Java/jre1.8.0_151/lib/rt.jar'
libraryjars 'c:/Program Files/Java/jre1.8.0_151/lib/ext/jfxrt.jar'
adaptresourcefilenames '**.zip'
dontwarn 'org.osgi.**'
dontwarn 'org.apache.**'
dontwarn 'tornadofx.**'
dontwarn 'kotlin.reflect.**'
keep 'class tornadofx..** { *; }'
keep 'class org.osgi..** { *; }'
keep 'class org.apache..** { *; }'
keep 'class kotlin.reflect..** '
keep 'class kotlin.text.** { *; } '
keep 'class watchDog.main { *; }'
keepclassmembernames 'class kotlinx.** { volatile <fields>; }'
keepclasseswithmembernames includedescriptorclasses: true, 'class com.fazecast.** { \
native <methods>; \
}'
keepclasseswithmembernames includedescriptorclasses: true, 'class com.fazecast.** { \
private volatile <fields>; \
}'
printmapping 'proguard.map'
}
Hi, I'm trying to obfuscate my code with 'Proguard', but I'm having some problems trying to run my application after using Proguard. This is my configuration file:
My classes are left this way:
When executing the application I get this error
This error occurs because all classes and packages are renamed when using 'Proguard'. Any recommendations on how I can configure proguard with TornadoFx? Without problems?
I'm using JsonModel, and when I run the
toJSON()
method it also generates that error.This is how the
toJSON()
method looks after being obfuscated. How can I make it work?I'm a little new with 'Proguard', I hope you can help me, thank you very much.