Rino Rino - 1 year ago 122
Android Question

How to add proguard mapping file on git (exclude in gitignore, Android Studio)

I need to add this file on git (Android Studio Project)


This is my .gitignore file (root of the project)


This is my .gitignore file (module app)


The files contained in app/build/outputs/mapping/my_flavor/release are always excluded by git.

Any suggetion on how I can solve it?


Answer Source

Easiest way:

git add -f app/build/outputs/mapping/my_flavor/relese/mapping.txt

You only need to use the -f flag the first time - .gitignore does not work for files that are already tracked.

However, I would recommend treating the mapping.txt file as a build artifact and NOT add it to version control, instead, store it along with your .apk file to wherever you are storing build artifacts.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download