TL; DR: how to pass proguard mapping to javac for compilation with obfuscation library?
This is long, but I don’t see how to make it shorter:
Background: I have the following product setup:
Android Studio project - Library module - (optional) Core module - (auxiliary) module A - (auxiliary) module B - (auxiliary) module C - Example application module -... Other modules
Each of the submodules of the A, B, C library of reference classes in Core, but A, B, C are independent of each other. Conceptually similar to Play Services, where the user can only have the code and the necessary submodule. Each of the submodules of the library has external APIs, but also many internal classes. The goal is to be able to distribute Core, A, B, C as independent aar-s.
Purpose: obfuscate all submodules together leaving only public APIs, but packages and distributing them separately in obfuscation / optimized form.
Question: I do not see how to use it with a simple gradle configuration. Do you need a custom build system here if there is no known solution?
What is needed here:
- Java compiling all submodules together
- Prologue-obfuscation them together.
- Run all other build processes separately
Where is the normal assembly process for each module: - Compile → do everything, including. obfuscation → package
Direct tuning does not work when compiling the first submodule after Core. If it were possible to pass Proguard mapping.txt as input to the Java compiler ... But I could not find such an option. Any ideas?
Thanks!!!
java android proguard android-proguard
Kirill K
source share