Android Library Project w/ 2 AAR

Hi, I have an Android gradle project which deploys 2 AAR, let’s call these Lib A and Lib B. Lib A gets obfuscated except for it’s public interface. Lib B relies on some of the obfuscated methods in Lib A and both exist in the same project as separate modules.

I noticed that upon compilation of Lib B, the outputted AAR uses the original methods before obfuscation of Lib A, so if both of these were to be put in a maven repository, it would break because the methods would mismatch.

My question is how can I get the mappings generated from Lib A to also apply to Lib B when Lib B is using methods from Lib A that get obfuscated?

Hi @herriojr,

Welcome to the PG community!

Have you tried using the -applymapping option to apply the mapping file of Lib A to Lib B? In theory, this should allow Lib B to share a mapping file with Lib A, making it feasible for Lib A to know the obfuscated method names from Lib A.

Please let me know if anything is not clear.

Kindest Regards,