I have android libraries A and B. Lets say library A is "Core" library and library B is "plug-in" for that core library.
Library B has dependency to library A through private-apis I wish to obfuscate for the public release of library A.
I am trying to build these libraries into separate AARs while also trying to obfuscate the private-api of library A and still be able to use them (the private-apis) from library B.
I am able to build these into separate AARs if I disable obfuscation. Then just import library A and library B separately in my test application and everything works.
My main problem is that I am not able to obfuscate the two libraries in one pass. Obviously if I use obfuscated version of A as dependency inside B, it wont have the private-apis (need to somehow transfer and use the mappings of proguard obfuscation). And if I use non-obfuscated version of A as a dependency inside B but use obfuscated version of A and B as a dependency in the final application, it wont work either.
My end goal is to be able to distribute the obfuscated versions of both libraries separately. This allows the user to select which plugins they wish to use with the core library inside their application.
I found similar question in: Run Proguard on multi-module project as "one piece"
but it concerns building an application which can be achieved with the
consumerProguardFiles
Appreciate all the help!