Skip to content
Advertisement

Tag: proguard

Gradle task to obfuscate java application with Proguard

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

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 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

Advertisement