Inspectopedia Help

Proguard.cfg file contains generic Android rules

Proguard.cfg file contains generic Android rules

Earlier versions of the Android tools bundled a single proguard.cfg file containing a ProGuard configuration file suitable for Android shrinking and obfuscation. However, that version was copied into new projects, which means that it does not continue to get updated as we improve the default ProGuard rules for Android.

In the new version of the tools, we have split the ProGuard configuration into two halves:

* A simple configuration file containing only project-specific flags, in your project

* A generic configuration file containing the recommended set of ProGuard options for Android projects. This generic file lives in the SDK install directory which means that it gets updated along with the tools.

In order for this to work, the proguard.config property in the file now refers to a path, so you can reference both the generic file as well as your own (and any additional files too).

To migrate your project to the new setup, create a new proguard-project.txt file in your project containing any project specific ProGuard flags as well as any customizations you have made, then update your file to contain:


Issue id: ProguardSplit

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for Android 2023.3, Qodana for JVM 2023.3


Android, 2022.3.1 Beta 2

Last modified: 13 July 2023