Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android library project obfuscation

Hi I developed one android library and Now I want to obfuscate it for redistribution. I develop my library with eclipse and android version 4.1.2. I tried obfuscating with eclipse and pro-guard. I do export and and also put proguard.config = proguard-project.text in project-properties but it not generating any jar file. It shows me result as its not allowing to library projects.

So I don't know how to obfuscating android library project. I need help regarding how to obfuscating of android library projects.

Need Help Thank you.

like image 960
nilkash Avatar asked Jul 26 '13 04:07

nilkash


People also ask

Does obfuscation reduce file size?

Obfuscation decreases the efficiency of compression algorithms, so obfuscating all the code in the app may increase its file size significantly.


1 Answers

The Android SDK doesn't apply ProGuard to library projects; it only applies ProGuard to final applications (including their libraries). The latter is more effective in terms of shrinking, optimization, and obfuscation, because it can work on a larger body of code and it doesn't need to preserve the public API of the libraries.

If you want to distribute your library as an end-product, you can post-process it, as discussed in the ProGuard manual > Examples > A typical library.

Alternatively, DexGuard, ProGuard's commercial sibling for Android, can also process library projects out of the box.

(I am the developer of ProGuard and DexGuard)

like image 75
Eric Lafortune Avatar answered Oct 21 '22 07:10

Eric Lafortune