How can I go about creating an obfuscate jar file? As of now I can easily export my Android lib project to a jar and use it. How do I obfuscate the jar file?
My end goa
To create an obfuscated jar file you can do that by adding build.xml file to it and making changes in your proguard-project.txt file and running ant release from command line and you will find the obfuscated.jar under a proguard folder in your bin folder of project
Steps
To add build.xml in your project in linux:
open a terminal and go to android/tools/ant folder and run
./android update project -p /path_of_your_android_library_project
and you will find build.xml in your project root directory.
to enable obfuscation in your project:
In your editor open a project.properties file and remove comment from
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
add your changes to proguard-project.txt file and in terminal go to your project and run
ant release