简体   繁体   中英

Proguard comes out of the box in android Studio? What does it means?

I was reading an article about Proguard in Android Studio their is a line

Proguard comes out of the box in android Studio

Can anyone please explain this to me? If you are interested to read the completed article I'll put the link below.

Article Link

It means that proguard is bundled together with your default android project and you do not need to download it from outside via gradle or maven

android {
    buildTypes {
        release {
            // Enables code shrinking, obfuscation, and optimization for only
            // your project's release build type.
            minifyEnabled true// Enables resource shrinking, which is performed by the
            // Android Gradle plugin.
            shrinkResources true// Includes the default ProGuard rules files that are packaged with
            // the Android Gradle plugin. To learn more, go to the section about
            // R8 configuration files.
            proguardFiles getDefaultProguardFile(
                    'proguard-android.txt'),
                    'proguard-rules.pro'
        }
    }
    ...
}

Ref: More on proguard usage in android

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM