I need to obfuscate a Java application which has dependencies to many external jars. The application consist of many modules and each module contains API and implementation jars. Basically I need to create a gradle task to obfuscate all of this jars which can be used later in the build process with Jenkins. There are many documentation on Proguard, but
Tag: proguard
How to configure proguard to keep all classes in packages that contain a specific word in package name?
I am trying to keep all classes in packages that contain the word model in the package name. Eg – com.xyz.model, com.xyz.abc.model, com.xyz.model.abc All the classes in these packages should not be obfuscated. I tried using wildcard for package names but it isn’t working How to achieve the desired result? Answer Please try below. Remove dot(.) before the model.
Android app crashes when minifyEnabled is true
I am using a multi-module app and the app crashes when minifyEnabled true in the installed module’s build.gradle. Following is the deobfuscated stacktrace I retrieved from play console. FATAL …
Does proguard converts all enums to int or needs to be configured for this
Does proguard automatically converts enums to integer for memory optimization or I have to configure it to do this? If I do have to configure what is the configuration? Answer The optimization is listed on ProGuard’s optimizations page. It appears to be one of the default optimizations, but it (like other optimizations) can be specified explicitly if you need more
Android ProGuard settings for Facebook
I finally found out why my app crashes built for release. ProGuard was indeed stripping code from my application but i prevented this by manually adding the classes with the keep command in the proguard-android.txt (found in the sdk). For Facebook I used: But I think I’m still missing something. The app is crash free now but I can’t log
keep only function names when obfuscation for proguard
I use proguard for obfuscation. How can I keep only function names while obfuscation. class names must be obfuscated but function names. if I use, and it keeps function of somefunction, but it doesnt change classes names. But, I want to change classes names but somefunction Answer You can use -keepclassmembers or -keepclassmembernames. Cfr. ProGuard manual > Usage > Overview
Proguard keep class names?
Hello I am writing an Android app and I have set up Proguard to obfuscate my application. I however use a classloader to dynamically load different extensions to my application. The problem is that these don’t load correctly if their names are changed. How do I keep Proguard from obfuscating specific class names? Answer Use the -keepnames option in your