Commit Graph

219 Commits

Author SHA1 Message Date
Fergal Whyte
ce2c8a8b5d Add ConfigurationWriterTest 2023-10-25 17:50:25 +02:00
Fergal Whyte
0032aa037c Prevent NullPointerException when parsing annotations 2023-10-25 17:44:19 +02:00
Sebastian Ratz
6f3610bd7b Fix inadvertent closing of System.out when printing configuration (#366)
Co-authored-by: Blend Hamiti <blend.hamiti@guardsquare.com>
2023-10-25 12:15:16 +02:00
James Hamilton
7c153f8eec Enable unit testing of Java 20 and 21 2023-10-12 12:59:11 +02:00
James Hamilton
bfdfa02f8c Support parsing of wildcard * when used as a field type or method return type in class specifications. 2023-10-11 18:10:05 +02:00
Thomas Vochten
7429219cd2 Allow method from interfaces to be inlined if it is private and is being called from within the interface 2023-09-22 09:05:54 +02:00
Thomas Vochten
8bb7cc0c4b Do not inline methods from interfaces 2023-09-21 05:37:20 +02:00
James Hamilton
57d4250464 Use internalShortClassName in KotlinMultiFileFacadeFixer 2023-07-07 15:58:50 +02:00
James Hamilton
4cff876e44 Fix "NoClassDefFoundError: Failed resolution of: Lorg/apache/logging/log4j/LogManager #326 (#328)
* Remove log4j from injected classes

* Add release note
2023-03-30 13:00:41 +02:00
Emiel Matthys
1f8f548d36 Remove unused import in kotlin test 2023-03-24 16:45:21 +01:00
James Hamilton
0dd91648be Remove ClassPrinter debugging from ClassUsageMarkerTest 2023-03-17 12:17:20 +01:00
James Hamilton
aa1835fb93 Update ProGuardCORE (#325)
* Update ProGuardCORE

* Remove Java 20 from test list
2023-03-14 16:56:47 +00:00
James Hamilton
dda133e476 Add InstantiationClassMarkerTest (#320) 2023-03-02 13:28:39 +00:00
tvoc-gs
745a681b32 Fix off-by-one error (#319) 2023-02-28 14:54:26 +00:00
Robin
12516ba710 Class merging only when optimizing aggressively 2023-02-03 09:08:45 +01:00
Robin
98309c9fbf Refactor ConfigurationChecker 2023-01-27 12:09:31 +01:00
James Hamilton
fbda5d5156 Update tests to use KotlinMetadataVerifier
New Pass that replaces the old KotlinMetadataAsserter
2023-01-09 17:48:00 +01:00
James Hamilton
81561a0f2e Update ProGuardCORE version 2023-01-09 17:36:41 +01:00
Jelle De Coninck
8a7e846ec7 Fix string comparison in MappingPrinter and LineNumberLinearizer 2023-01-07 13:53:58 +01:00
James Hamilton
9b8f80229a Set the IS_CLASS_AVAILABLE processing flag 2022-12-14 17:23:52 +01:00
James Hamilton
1cbd6f7a68 Remove unused ExpectedStackTypeFinder 2022-12-14 17:23:52 +01:00
Thomas Vochten
3445fa02d6 Add -optimizeaggressively configuration option 2022-12-09 12:13:35 +01:00
Jelle De Coninck
4c6103eb2e Decrement uninitialized object count in MethodInliner when <init> is a LibraryMethod 2022-12-09 12:13:35 +01:00
James Hamilton
47e080f526 Update kotest dependencies 2022-12-09 12:13:35 +01:00
daphnis.chevreton
84ac82eb51 Fix linter issues 2022-11-24 15:25:10 +01:00
Ruben Pieters
2909a2ca7b Document supported/unsupported cases in TypeArgumentFinder. Fix incorrect invoke/getfield/getstatic case. 2022-11-24 15:24:58 +01:00
James Hamilton
c4a5a89194 Update ProGuardCORE dependency 2022-11-17 11:07:12 +01:00
James Hamilton
3226de6d0c Expand imports in LambdaExpressionConverter 2022-11-17 11:07:07 +01:00
James Hamilton
9c6eb91d01 Replace local constants with ProGuardCORE constants 2022-11-17 11:06:54 +01:00
James Hamilton
731ffd812d Conservatively keep annotation class constructor parameter names 2022-11-17 11:06:47 +01:00
James Hamilton
72f0ef13db Ensure that Kotlin parameters are kept when using -keepparameternames 2022-11-17 11:05:09 +01:00
Nadeesh T V
64c7322624 Add classintegrity asserter for enum entries 2022-11-16 15:58:41 +01:00
daphnis.chevreton
ec3ce071bf Synchronise Kotlin companion and instance field before fixing name conflicts 2022-11-10 14:59:57 +01:00
James Hamilton
902a7f19c3 Update GSON comments 2022-11-09 13:50:34 +01:00
James Hamilton
ff74c14eba Update unsupported Kotlin version message 2022-11-09 13:47:56 +01:00
James Hamilton
7473a042cc Update GSON warning message (#293) 2022-11-09 13:45:01 +01:00
Toon Willemot
cf5d492b00 Automatically process Kotlin metadata when keeping the annotation
Add dontprocesskotlinmetadata configuration option.
2022-10-20 17:28:21 +02:00
James Hamilton
aa1936cc5f Mark context receiver parameters as used
To avoid the context receiver list becoming out of sync due to parameter shrinking, we now mark parameters at the same indices as context receivers as used.

This is a temporary solution and should be replaced with a solution that properly takes into account context receivers during optimization, so that e.g. unused context receivers can be removed.

~This diff adds support to the `MethodDescriptorShrinker` for shrinking the list of context receivers of a method.~

~There are some cases we cannot handle:~

~* properties where there is both a getter + setter~
~* functions with default parameters (in JVM land, a `$default` companion method)~
~* where the referencedMethod is null~

~Since we optimize each method independently, we can't be sure that the parameter lists are in sync when there are multiple JVM methods attached to a Kotlin entity like when there is a getter and setter together.~
2022-10-20 17:13:08 +02:00
James Hamilton
4ab73b2429 Update dependency versions (#287) 2022-10-14 17:01:47 +02:00
James Hamilton
8f491a9a56 Replace ProGuard Assembler dependency (#286)
It's now published to Maven Central. It's not needed directly but for the test fixtures which now has a transitive dependency on the Maven Central artefact.
2022-10-13 18:53:22 +02:00
James Hamilton
97e501d1b9 Add ClassUsageMarkerTest 2022-09-16 17:37:20 +02:00
James Hamilton
142e7d5cbf Take into account potential null default implementation references 2022-09-15 17:28:38 +02:00
James Hamilton
51a6e71bfb Fix isPoppingExpectedType check
This should check the type against type instead of type against class name.
2022-09-09 15:00:03 +02:00
James Hamilton
3f8733d4fd Fix simple enum optimization (#275) 2022-09-01 16:52:36 +02:00
Pramitha Fernando
75b5e9854f Move logging out of DataEntryWriterFactory (#274)
Co-authored-by: Pramitha Fernando <pramitha.fernando@guardsquare.com>
2022-08-30 17:43:16 +02:00
James Hamilton
d532ce8812 Move logging out of DataEntryReaderFactory 2022-08-29 18:03:30 +02:00
James Hamilton
a1244e15f6 Write aar classes to lib folder, if not merging 2022-08-29 17:02:51 +02:00
James Hamilton
2d12f51b98 Add plain dex writing support to DataEntryWriterFactory 2022-08-26 17:55:58 +02:00
James Hamilton
d78af60166 Rename alternativeClassDataEntryWriterProvider 2022-08-26 15:20:28 +02:00
Pramitha Fernando
594507af03 update DataEntryReaderFactory & DataEntryWriterFactory 2022-08-26 15:20:28 +02:00