rollbar-java icon indicating copy to clipboard operation
rollbar-java copied to clipboard

Automatically update Proguard mapping file for a given build

Open rivkahstandig3636 opened this issue 8 years ago • 2 comments

Crashlytics does this already and we have a user requesting this.

rivkahstandig3636 avatar Jan 23 '18 18:01 rivkahstandig3636

For anyone looking for a way to automatically upload their maps in the interim, add this to your build.gradle:

afterEvaluate {
    assembleRelease.doLast {
        exec {
            def accessToken = "asdfgh123456" // Your Rollbar server upload access token
            def version = android.defaultConfig.versionName
            def mapping = "$buildDir/outputs/mapping/release/mapping.txt"

            commandLine 'curl', 'https://api.rollbar.com/api/1/proguard',
                    '-F', "access_token=$accessToken",
                    '-F', "version=$version",
                    '-F', "mapping=@$mapping"
        }
    }
}

NOTE: This will only work on Mac/Linux.

colinrtwhite avatar Feb 21 '18 21:02 colinrtwhite