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 project.properties
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 project.properties file to contain:
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
Issue id: ProguardSplit
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for Android 2023.3, Qodana for JVM 2023.3 |
Plugin: | Android, 2022.3.1 Beta 2 |