6

I have the following situation: I have a project in Android Studio 1.4, which has 3 modules. The main module is the one for the app, the other 2 are library modules/subprojects. So when I build the whole project (using gradle), I get the app as .apk with all dependencies (the 2 library modules), and everything works as intended. I can also enable the minify option for ProGuard in the build.gradle file of the app module, which shrinks the app.

The 2 library modules additionally produce .aar files that I can use in other app projects (when running a release build for the whole project). Now I want to distribute the libraries, and I want to have them obfuscated (not shrinked) via ProGuard.

I want to have them automatically obfuscated during the release build of my app (preserving public APIs of course) without breaking the build process of my app because of missing classes etc. I tried to get this working using 'consumerProguardFiles' entries within the build.gradle files of the libraries, but with no success.

So how can I achieve that?

Strunz
  • 61
  • 3

0 Answers0