2

I'm trying to test the App, but I'm wondering which option actually enables obfuscation.

if minifyEnabled is false, will the files still be obfuscated?

buildTypes {
        debug {
          //  minifyEnabled true
            useProguard true
            proguardFiles getDefaultProguardFile('proguard-android.txt'),
                    'proguard-rules.pro'
        }
        release {
           // minifyEnabled true
           // shrinkResources true
            useProguard true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro',
                    'proguard-fresco.pro.txt'

        }
    }
Relm
  • 7,923
  • 18
  • 66
  • 113
  • http://stackoverflow.com/questions/32163235/what-is-meant-the-minifyenabled-false-in-the-release-block-in-the-gradle-build-f – IntelliJ Amiya Jan 25 '17 at 05:35
  • No, proguard is deactivated when the minifyEnabled is set to false. You can turn obfuscation on/off in proguard-rules.pro. – tahsinRupam Jan 25 '17 at 06:19

1 Answers1

-1

To enable proguard or shrink your code set minifyEnabled to true

android {
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'),
                    'proguard-rules.pro'
        }
    }
    ...
}

read the documentation at https://developer.android.com/studio/build/shrink-code.html

Deepak Goyal
  • 4,747
  • 2
  • 21
  • 46