Scenario: App needs dependency A.jar.
A.jar has a ProGuard obfuscation stage that generates a mapping file (A-mapping.txt).
App is getting obfuscation as well.
How do I pass A-mapping.txt to the app in its build process? I'd need something like a shared directory between all the dependencies where I put all my mapping files.
I want to include A-mapping.txt in app ProGuard configuration file with: -applymapping A-mapping.txt
Would this be possible with Maven?
I would use the
unpackgoal of themaven-dependencyplugin .Its documentation is here: https://maven.apache.org/plugins/maven-dependency-plugin/unpack-mojo.html
For your case it should look like:
You will have your mapping file extracted in
${project.build.directory}/your/mappingsso you can use them to build your final application in a subsequent maven phase.