Jack and Jill minify equivalent

284 Views Asked by At

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!

1

There are 1 best solutions below

2
On BEST ANSWER

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