Question

I'm currently building an android application using ANT on a Jenkins server.

DexGuard is set to run on release in the custom_rules.xml.

Currently there is an issue when DexGuard tries to convert a method:

    [dexguard] Unexpected error while converting:
    [dexguard]   Class       = [o/?]
    [dexguard]   Method      = [?(Ljava/lang/String;)Lo/?;]
    [dexguard]   Exception   = [java.lang.IllegalStateException] (Variable v17 too large for instruction [neg-int v17, v17])
    [dexguard] java.lang.IllegalStateException: Variable v17 too large for instruction [neg-int v17, v17]
    ...
    Stack trace
    ...
    [dexguard] Not converting this method

My question is, is there a way to get DexGuard to exit with an error status so that either ANT or Jenkins can mark the build as failed?

At the moment it simply prints the stack trace and continues.

I am currently using the Text-finder plugin for Jenkins as a post build step to match a DexGuard exception. If found it downgrades the build to failed.

Was it helpful?

Solution

DexGuard currently ignores methods that it can't convert from Java bytecode to Dalvik bytecode, for any reason -- notably corrupt input code. In this case, it looks more like a bug in DexGuard itself. We'll fix it as soon as possible, and we'll consider adding a flag to stop with an error status.

(I am the lead developer of ProGuard and DexGuard)

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