After much development and testing, we are pleased to announce the official release of ProGuard 6.1.0.
This version offers bug fixes and the following important features:
- Added support for Java 10, 11 and 12. ProGuard now processes the new constructs for nest access and dynamic constants.
- Backporting code that uses Java 8 stream and time API. ProGuard can now automatically convert calls to these Java 8 APIs, by adding the net.sourceforge.streamsupport library and the org.threeten library as dependencies in your project. This is particulary useful on Android, since it does not have these APIs.
- Optimization of Gson serialization. Gson is a convenient and widely used library to serialize and deserialize classes to and from JSON strings. ProGuard can now optimize its inefficient reflection into more compact and efficient direct code.
- Added
-assumevalues
option (compatible with R8). You can now tell ProGuard that specified fields or methods have known return values. ProGuard then optimizes the related code. For example, you can let it remove debug code by specifying that a debug flag is known to be false, or you can let it remove unneeded parts of the Android support libraries by specifying the expected range of Android API versions.
As always, ProGuard (6.1.0) is backward compatible with earlier versions. Just update the version and you're good to go. You can find ProGuard on Sourceforge, Github, Maven Central, and JCenter. All ProGuard documentation is available here.
Note: Remember to disable the R8 compiler and enable ProGuard in the project’s gradle.properties, when building Android projects with Gradle:
android.enableR8=false
android.enableR8.libraries=false
Then specify the ProGuard version in your build.gradle configuration:
buildscript {
...
configurations.all {
resolutionStrategy {
force 'net.sf.proguard:proguard-base:6.1.0'
}
}
}
Guardsquare
Connect with the author
Other posts you might be interested in
Android
14 min read
| October 1, 2024
Ensuring the Security of Mobile On-Device Machine Learning
Read More
Android
8 min read
| September 24, 2024
Introducing a Market-Changing Approach to Mobile App Security
Read More
Android
10 min read
| September 17, 2024