Releases: Guardsquare/proguard
7.2.0-beta2
Bug fixes
- Fix bug introduced in
7.2.0-beta1
: potentialjava.lang.UnsupportedOperationException: No class provided, and an appropriate one cannot be found
exception when running on Java 11 - Fix potential
NullPointerException
when initializing Kotlin callable references. (T5899
) - Prevent requiring
--enable-preview
on a JVM for Java 16 class files (write class file version60.0
instead of60.65535
).
Java Support
New Java versions are released every 6 months.
To allow ProGuard to continue to optimize, obfuscate and shrink Java class files ProGuard now supports all Java versions including Java 17.
- Add support for Java 17. (
PGD-132
)
Kotlin Support
New Kotlin versions are released every 6 months.
To allow ProGuard to continue to optimize, obfuscate and shrink Kotlin generated class files and their corresponding metadata ProGuard now supports reading Kotlin classes from version 1.0 to 1.5 and writing Kotlin metadata with version 1.4 (readable by Kotlin reflection library / compiler 1.3 - 1.5).
- Add support for processing Kotlin 1.5 metadata. (
T5036
)
7.2.0-beta1
Java Support
New Java versions are released every 6 months.
To allow ProGuard to continue to optimize, obfuscate and shrink Java class files ProGuard now supports all Java versions including Java 17.
- Add support for Java 17. (
PGD-132
)
Kotlin Support
New Kotlin versions are released every 6 months.
To allow ProGuard to continue to optimize, obfuscate and shrink Kotlin generated class files and their corresponding metadata ProGuard now supports reading Kotlin classes from version 1.0 to 1.5 and writing Kotlin metadata with version 1.4 (readable by Kotlin reflection library / compiler 1.3 - 1.5).
- Add support for processing Kotlin 1.5 metadata. (
T5036
)
7.1.1
Version 7.1.1
Miscellaneous
Bug fixes
- Fix initialization and obfuscation of Kotlin callable references when using Kotlin 1.4. (
T5631
) - Fail build when
IncompleteClassHierarchyException
is encountered. (T5007
) - Fix potential hanging of ProGuard process during optimization or obfuscation.
7.1.0
Version 7.1 (June 2021)
AGP 7 compatible Gradle plugin
The way ProGuard is integrated into Android projects is changing because AGP 7 will no longer allow developers to disable R8 with the android.enableR8
Gradle property.
ProGuard 7.1 includes a new Gradle plugin which allows for a seamless integration with this new AGP version. A detailed and step-by-step guide for transition from the previous plugin is provided in the upgrading guide.
- Simple integration with Android Gradle Projects by adding a dependency on the
ProGuard Gradle Plugin artifact and applying thecom.guardsquare.proguard
plugin, as presented in the gradle setup instructions.
Java support
New Java versions are released every 6 months.
To allow ProGuard to continue to optimize, obfuscate and shrink Java class files we have added support for the latest releases, up to Java 16.
This includes
- Add support for processing Java 14, 15 and 16 class files. (
PGC-0015
,PGD-0064
) - Add support for Java 14 sealed classes. (
PGD-0064
) - Add support for records (previewed in Java 15/16, targeted for Java 17). (
PGD-0064
)
New optimizations
ProGuard 7.1 adds 5 new code optimizations. These optimization aim at reducing the number of classes required by the application and help pinpointing the specialized type wherever possible. This can have a positive impact on code shrinking and application performances.
method/specialization/returntype
- specializes the types of method return values, whenever possible.method/specialization/parametertype
- specializes the types of method parameters, whenever possible.method/generalization/class
- generalizes the classes of method invocations, whenever possible.field/specialization/type
- specializes the types of fields, whenever possible.field/generalization/class
- generalizes the classes of field accesses, whenever possible.
Maven central
ProGuard was previously hosted at JCenter, but this repository has recently been removed.
ProGuard is now published to Maven Central.
- Simple integration : follow the gradle setup instructions to select the
mavenCentral()
repository and dependencies to theproguard-gradle
artifact.
Easier configuration
The -addconfigurationdebugging
allows to help configuring ProGuard -keep
rules. For more details and to see this in action have a look at Configuring ProGuard, an Easy Step-by-Step Tutorial.
-addconfigurationdebugging
previously reported -keep
rule suggestions for classes, methods or fields that did not exist in the app. Such -keep
rules are not necessary.
ProGuard 7.1 improves the suggestion of -keep
rules by only suggesting rules for classes, methods and fields that were actually in the original application (DGD-3264
).
- More precise keep rule suggestions provided by
-addconfigurationdebugging
. - Easier ProGuard -keep rules configuration.
- Reduced ProGuard configuration size.
Miscellaneous
Improvements
- Remove Gradle plugin dependency on Android build tools. (
PGD-0066
) - Improve error message when missing classes result in an incomplete class hierarchy. (
DGD-0013
) - Improve speed of horizontal class merging. (
DGD-1471
) - Fix potential
NullPointerException
during GSON optimization. (T3568
,T3607
) - Fix potential dangling switch labels and next local index in
GsonDeserializationOptimizer
. - Fix potential
NoClassDefFoundError
at runtime after applying Gson optimization to library project. (T2374
) - Improve general performance and stability of optimization.
Bug fixes
- Fix
ProGuardTask
Gradle task compatibility with Gradle 7. (PGD-0136
) - Fix potentially incorrect class merging optimizations that could cause a run-time
NullPointerException
. (DGD-3377
) - Fix Gradle task error when using an existing
-outjar
directory. (PGD-0106
) - Fix potential class merging optimization issue resulting in
ArrayIndexOutOfBoundsException
during build. (DGD-1995
) - Fix enum unboxing for already obfuscated code. (
DGD-0567
) - Fix potential parameter removal optimization issue when optimizing constructors. (
PGD-0018
,PGD-0019
) - Fix potential
IllegalArgumentException
(Stack size becomes negative) inclass/merging/wrapper
optimization. (DGD-2587
) - Fix wrapper class merging with
new
/dup
/astore
sequences. (DGD-1564
) - Fix potential incorrect removal of exception handlers during optimization. (
DGD-3036
) - Fix potential, incorrect advanced code optimizations. (
DGD-3289
) - Disallow merging of nest hosts or members during class merging optimization. (
PGD-0037
) - Fix packaging of Ant plugin. (
PGD-0052
) - Fix potential IllegalArgumentException in GSON optimization. (
PGD-0047
) - Fix writing of kept directories. (
PGD-0110
) - Fix storage and alignment of uncompressed zip entries. (
DGD-2390
) - Fix processing of constant boolean arrays. (
DGD-2338
) - Prevent injected classes from being merged into other classes.
7.1.0-beta5
Issue | Explanation |
---|---|
DGD-3377 | Fix potentially incorrect class merging optimizations that could cause a run-time NullPointerException . |
Add new AGP 7.0 compatible Gradle plugin. |
7.1.0-beta4
Issue | Explanation |
---|---|
DGD-3264 | Reduced false positives when using -addconfigurationdebugging . |
7.1.0-beta3
Issue | Explanation |
---|---|
PGD-0054 | Published ProGuard to Maven Central. |
DGD-0013 | Improved error message when missing classes result in an incomplete class hierarchy. |
PGD-0151 | Rolled back major ProGuardTask refactor (#139). |
PGD-0149 | Fixed invalid names being produced when ProGuard was being run concurrently within the same classloader . |
PGD-0141 | Fixed optimization bug introduced in 7.1.0-beta2 due to missing marking of classes that contain constructors during optimization. |
Add missing optimization info for new optimizations introduced in 7.1.0-beta2 to GUI resources. |
7.1.0-beta2
Issue | Explanation |
---|---|
PGD-0139 | Improved handling of Gradle task inputs and outputs. |
PGD-0106 | Fixed Gradle task error when using an existing -outjar directory. |
PGD-0136 | Fixed Gradle task compatibility with Gradle 7. |
DGD-1995 | Fixed potential class merging optimization issue resulting in ArrayIndexOutOfBoundsException during build. |
DGD-0567 | Fixed enum unboxing for already obfuscated code. |
PGD-0018, PGD-0019 | Fixed potential parameter removal optimization issue when optimizing constructors. |
Added optimization method/specialization/returntype . |
|
Added optimization method/specialization/parametertype . |
|
Added optimization method/generalization/class . |
|
Added optimization field/specialization/type . |
|
Added optimization field/generalization/class . |
|
DGD-2587 | Fixed potential IllegalArgumentException (Stack size becomes negative) in class/merging/wrapper optimization. |
DGD-1564 | Fixed wrapper class merging with new /dup /astore sequences. |
Prevent injected classes from being merged into other classes. | |
DGD-1471 | Improved speed of horizontal class merging. |
Improved general performance and stability of optimization. |
7.1.0-beta1
Issue | Explanation |
---|---|
DGD-3036 | Fixed potential incorrect removal of exception handlers during optimization. |
DGD-3110 | Improved GSON support. |
DGD-3289 | Fixed potential, incorrect advanced code optimizations. |
PGD-0037 | Disallowed merging of nest hosts or members during class merging optimization. |
PGD-0052 | Fixed packaging of Ant plugin. |
PGD-0047 | Fixed potential IllegalArgumentException in GSON optimization. |
PGD-0110 | Fixed writing of kept directories. |
PGC-0015 | Added support for Java 16. |
PGD-0064 | Added support for Java 14 and 15. |
PGD-0064 | Added support for sealed classes (permitted subclasses attributes). |
PGD-0064 | Added support for record attributes. |
DGD-2390 | Fixed storage and alignment of uncompressed zip entries. |
DGD-2338 | Fixed processing of constant boolean arrays. |
ProGuard 7.0.1
Issue | Explanation |
---|---|
DGD-2382 | Fixed processing of Kotlin 1.4 metadata annotations. |
DGD-2494 | Fixed naming conflict resolution potentially resulting in the renaming of library members. |
Extended expressions supported by Retrace. |