Question

Some of you guys might be aware that automatically upload iOS symbolication file(dSYM) to crittercism server from jenkins is possible using Crittercism dSYM Plugin .

I am looking for similar plugin which can upload android proGuard mapping file ("mapping.txt") to crittercism directly from jenkins.

those who have some relevant idea, please share your thought.

Was it helpful?

Solution

You can now upload mapping.txt files automatically using the APIs built specifically for Android and Android NDK.

More information can be found here: http://docs.crittercism.com/android/android.html#uploading-the-mapping-txt-file

As a note, just found this question again, but this has been out for a while now.

OTHER TIPS

Following the crittercism doc Eddie mentioned you could wrap the curl command in a gradle task. If you set your new task to the assembleRelease finalizeBy then a mapping file will upload every time a release apk is built. Of course you will need to define those variables yourself.

task uploadMapping(type: Exec, dependsOn: 'assembleRelease') {

    commandLine 'curl',
            "https://app.crittercism.com/api_beta/proguard/$critterAppId",
            '-F', 'proguard=@build/outputs/mapping/release/mapping.txt',
            '-F', "app_version=$appVersionName-$appVersionCode",
            '-F', "key=$critterKey"
}
assembleRelease.finalizedBy uploadMapping

I asked this to crittercism support group as well .

First of all i wold like to appreciate their prompt response .

As per that mail, automatic upload option for Android symbolication is not supported yet and is something they want to target in upcoming release .

lets hear the story from the horse's mouth :


Date: Tue, 28 May 2013 18:13:09 +0000 From: support@crittercism.com To: XXX@XXX.com Subject: Re: Is there any API to upload "mapping.txt" for android app

Hi Shailendra,

Good to hear from you. Sorry for the delay in responding, yesterday was a holiday here for us, and I only saw your message this morning.

Regarding the automatic upload of the mapping.txt files, I'm afraid this isn't currently possible. We have been planning this feature for several sprints, but it has not been included yet.

I'll go ahead and add your comments to the feature request which we have been working on. This week I'll be pushing to get this feature scheduled, but it may take some time before it is fully ready.

Would you like us to let you know when it comes out?

Are there any other features which would make using Crittercism a better experience for you?

Thanks for your feedback!

Jeremiah

On May 28, 2013 at 5:31 p.m. Shailendra Rajawat wrote:

Waiting for your response .
Regards,
Shailendra

On May 27, 2013 at 1:57 p.m. Shailendra Rajawat wrote:

    Hi,
    Hope you are doing great.
    i am using cttercism for android and i want to automate the process of uploading proGuard mapping file "mapping.txt" .
    i am using jenkins -CI and will be delighted if somehow jenkins can send mapping.txt to crittercism server automatically. its

possible only if you provide such kind of API . i came to know that such api is available for iOS dSYM file uploading . waiting for your response.

    Regards,
    Shailendra

My solution is working fine.(local build and jenkins build)

for me, only working when build is from jenkins

make sure your APPID, APPKEY, and path(release_jenkins.... normally release)

build.gradle (app) (add at the end)

task uploadPro << {
    logger.error("Uploading mapping.txt file to crittercism")
    String temp = projectDir;
    temp = temp.replace("\\", "/");
    String[] cmd = ["curl", "-k", "https://app.crittercism.com/api_beta/proguard/AppIDSting",
                 "-F", "proguard=@" + temp + "/build/outputs/mapping/release_jenkins/mapping.txt",
                 "-F", "app_version=" + VERSION_NAME + '-' + VERSION_CODE,
                 "-F", "key=API_KEY"]
    logger.error("CMD : " + cmd)
    ProcessBuilder builder = new ProcessBuilder(cmd);
    Process process = builder.start();
    process.waitFor()
    println process.err.text
    println process.text
    }

gradle.buildFinished {
    //check your build type. I am not sure it's the best way to do it.
    logger.error("JSC : 이름 ! - " + gradle.startParameter.taskNames);
    if (gradle.startParameter.taskNames.contains("assembleRelease_jenkins")) {
        logger.error("JSC : 올리기 시작 ! - " + gradle.startParameter.taskNames);
        tasks.uploadPro.execute()
    } else {
        logger.error("JSC : PASS")
    }
}

jenkins console output capture

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top