The gradle plugin to add proguard snippets to your proguard setting file quickly.
This project is maintained by hotchemi
The gradle plugin to add proguard snippets to your proguard setting file quickly.
This plugin pulls the proguard information from the krschultz/android-proguard-snippets.
If you wanna add the snippets, PR to android-proguard-snippets!
You can download from Bintray.
I'm currently submitting to jcenter. Wait a little!
Add following the code to your root build.gradle
.
apply plugin: 'add.proguard'
buildscript {
repositories {
maven {
jcenter()
url "http://dl.bintray.com/hotchemi/maven"
}
}
dependencies {
classpath 'com.github.hotchemi:gradle-proguard-plugin:0.1.0'
}
}
Use the addProguard
task as described below.
./gradlew addProguard -Plib=butterknife
The plugin add the proguard snippets to your *.pro
file.
You must prepare the one .pro file. If there are several files or nothing, the plugin shows the warning.
And you can use the aP
task, it is the shortcut of the addProguard
.
./gradlew aP -Plib=butterknife
You can choose plural arguments.
./gradlew aP -Plib="butterknife gson rx-java"
If you already added the snippets of the library, the plugin stops task and shows the warning.
proguard-rules.pro already contains library's snippet. Do you continue(y/n)?
git checkout -b my-new-feature
)git commit -am 'Added some feature'
)git push origin my-new-feature
)