Copy ProGuard rules for Gson, Retrofit, or OkHttp into your Android project to fix release build crashes.
Use as a reference when adding a library that does not bundle its own ProGuard configuration.
Maintain an older Android project that relies on libraries without built-in keep rules.
When Android developers build a release version of their app, they often run a tool called ProGuard that shrinks the code by removing unused parts and renames variables and classes to shorter names. This makes the app smaller and harder to reverse-engineer. The problem is that ProGuard sometimes removes or renames code that a third-party library still needs, causing crashes at runtime. To prevent this, each library requires specific configuration rules that tell ProGuard what to leave alone. This repository is a collection of those configuration rules for dozens of popular Android libraries. Instead of every developer having to research and write these rules themselves, they can just copy the appropriate file from this project and add it to their build. The collection covers libraries that were widely used during the height of Android development in the early-to-mid 2010s, including Gson, Retrofit, OkHttp, Picasso, EventBus, Facebook, Google Play Services, Crashlytics, Realm, and many others. The setup is straightforward. You add the relevant configuration files to your Android project and reference them in your Gradle build file, which is the configuration file Android projects use. Each file contains only the rules needed for that specific library, so you include one file per library rather than one large combined file. The files are designed to sit alongside the official default ProGuard configuration that Google provides for Android. The project is no longer actively maintained and the library list reflects what was current several years ago. Many modern Android libraries now bundle their own ProGuard rules inside the library package itself, reducing the need for a repository like this one. However, it remains a useful reference for older projects or for libraries that still do not include their own rules. Contributions and requests for additional library configurations were accepted via pull requests and issues when the project was active.
← krschultz on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.