-1

Recently I've decided to migrate my android project to Jack and Jill build chain. But now I'm facing multi-dex problem that was not present in the previous build chain, so my questions arise.

What is the equivalent of "minifyEnabled true" when using Jack&Jill for debug build and whether the new chain provides any way of automatic removal of unused libraries code?

Below I provide my current code which cause dex problems:

   defaultConfig {
    applicationId "xxx"
    minSdkVersion 16
    targetSdkVersion 25
    versionCode getVersionCode()
    versionName getVersionName()
    jackOptions{
        enabled true
   }
} 

buildTypes {
    release {
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt')
        signingConfig signingConfigs.release
    }
    debug {
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt')
        useProguard true
    }
}

I'll be thankful for any help, thanks!

2
  • Did you try leaving minifyEnabled true in there? AFAIK it's the same flag.
    – weston
    Commented Feb 9, 2017 at 13:01
  • Yes, it effects in: "Error:A problem occurred configuring project ':app'. > Minifying the variant used for tests is not supported when using Jack." Commented Feb 9, 2017 at 13:13

1 Answer 1

0

Nothing I have read suggests that there is any change needed with regard to minifyEnabled true. And that Jack does support it and works with multidex.

From: http://tools.android.com/tech-docs/jackandjill#TOC-Overview

...Jack also handles any requested code minification (shrinking and/or obfuscation). The output is then assembled into an APK file as normal. Including support for multiple dex files if you have enabled that support.

Jack's Shrinking and Obfuscation does not support all of proguard's options however. There is a list here:

http://tools.android.com/tech-docs/jackandjill#TOC-Shrinking-and-Obfuscation-support

2
  • debug { proguardFiles getDefaultProguardFile('proguard-android-optimize.txt') useProguard true minifyEnabled true } Results in: "Error:A problem occurred configuring project ':app'. > Minifying the variant used for tests is not supported when using Jack." Commented Feb 9, 2017 at 13:14
  • Right, you can't put it in the defaultConfig apparently. stackoverflow.com/questions/37314760/…
    – weston
    Commented Feb 9, 2017 at 13:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.