Git Product home page Git Product logo

as_proguard's Introduction

Android Studio Proguard

##Why wrote

there are some differences between AndroidStudio and eclipse, such as: third-party library is no longer required to declare with -libraryjars,Otherwise,Android studio will throw a exception:java.io.IOException: The same input jar [xxx.jar] is specified twice. this script is based on google official proguard-android.txt,I just added some necessary content

##How to use:

###gradle 2.5 or later(>=gradle2.5):

android.buildTypes {
    release {
        minifyEnabled = true
        proguardFiles  += file('proguard-rules.txt')
    }
}

###other old gradle version(<gradle2.5):

android {
    buildTypes {
        release {
            runProguard true
            proguardFile 'proguard-android.txt'
        }
    }
}

#中文:

##Android Studio 混淆脚本

由于AndroidStudio的混淆脚本和eclipse有些不同比如:android studio已经不需要-libraryjars 来声明第三方库了,否则会报库被引用两次的错误信息。 此脚本仅仅是在google官方脚本proguard-android.txt上增加了部分内容

##使用方法:

###gradle 2.5及以上版本:

android.buildTypes {
    release {
        minifyEnabled = true
        proguardFiles  += file('proguard-rules.txt')
    }
}

###gradle 2.5以下版本:

android {

    buildTypes {
        release {
            runProguard true
            proguardFile 'proguard-android.txt'
        }
    }
}

as_proguard's People

Contributors

einst avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.