Need help with android-proguard-snippets?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

4.6K Stars 619 Forks Apache License 2.0 213 Commits 65 Opened issues


Proguard configurations for common Android libraries

Services available


Need anything else?

Contributors list


Example Proguard configurations for common Android libraries.

This project assumes that your ProGuard configuration is based off of the latest official proguard-android.txt config as shown below. Each library configuration should only be the rules required for that specific library, not a complete Android ProGuard configuration. The various library configurations are combined by the Gradle build system. The library rules should be universal, any app specific rules (such as preserving model classes) should be added in a custom

Request additional libraries through issues. Pull requests are welcome.

Android Arsenal


android {
  buildTypes {
    release {
      minifyEnabled true
      // Library specific proguard files
      proguardFile ''
      proguardFile ''
      // Default proguard files & project app specific rules,
      //  see examples folder for more information
      proguardFile ''
      proguardFile getDefaultProguardFile('proguard-android.txt')
      // As of Gradle Android plugin 1.1.0, the test APK has a separate config
      testProguardFile ''

Instead of declaring each configuration file manually, you could also store them in a seperate directory and include them all at once:

FileCollection proGuardFileCollection = files { file('./proguard').listFiles() }


ProGuard tip for android libraries developers

The android libraries developers can include the proguard directives in the libraries. The Android Plugin for Gradle automatically appends ProGuard configuration files in an AAR (Android ARchive) package and appends that package to your ProGuard configuration

The developers only need to specify the Proguard file with

instead of
defaultConfig {
    consumerProguardFiles ''

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.