krschultz / android-proguard-snippets

Proguard configurations for common Android libraries
http://www.kevinrschultz.com/blog/2014/02/15/proguard-with-gradle/
Apache License 2.0
4.59k stars 598 forks source link

Gradle library with Jitpack support #113

Open bobvanderlinden opened 8 years ago

bobvanderlinden commented 8 years ago

It seemed useful to have a library with all proguard rules in there, so that the library can be added to any project, instead of copying individual proguard files. This PR will add gradle build files which result in an AAR file. Functionally, the AAR file contains only proguard.cfg. (it also includes an empty BuildConfig.class and AndroidManifest.xml, but that's normal for Android libraries)

This is similar to what RxJavaProGuardRules does. RxJavaProGuardRules used Travis to build and publish to Maven Central. Jitpack.io is a bit easier for projects like these. Once this PR is merged it should be available on: https://jitpack.io/#krschultz/android-proguard-snippets

It can be added to other projects as follows:

repositories {
    maven { url "https://jitpack.io" }
}

And:

dependencies {
    compile 'com.github.bobvanderlinden:android-proguard-snippets:master-SNAPSHOT'
}

Or, once a tag is created in Github people can use:

dependencies {
    compile 'com.github.bobvanderlinden:android-proguard-snippets:1.0'
}

As an experiment I did the same for my fork. You can check it here: https://jitpack.io/#bobvanderlinden/android-proguard-snippets

Please let me know if this is desired or whether there are still problems with this solution.