From f1f90313fc22c122a28716e7ecac1543e6fa253e Mon Sep 17 00:00:00 2001 From: Marcono1234 Date: Sat, 18 Sep 2021 02:19:50 +0200 Subject: [PATCH] Improve Maven build (#1964) - Specify missing plugin versions - Fix or suppress ProGuard notes and warnings --- gson/pom.xml | 31 ++++++++++++------- .../test/resources/testcases-proguard.conf | 5 ++- pom.xml | 1 + 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/gson/pom.xml b/gson/pom.xml index dcdbe846..856908ae 100644 --- a/gson/pom.xml +++ b/gson/pom.xml @@ -10,27 +10,25 @@ gson Gson + + 7.1.1 + + Apache-2.0 https://www.apache.org/licenses/LICENSE-2.0.txt - + junit junit test - - com.github.wvengen - proguard-maven-plugin - 2.4.0 - test - - + @@ -111,14 +109,17 @@ com.github.wvengen proguard-maven-plugin + 2.4.0 process-test-classes - proguard + + proguard + - 6.2.2 + ${proguardVersion} true test-classes-obfuscated-injar test-classes-obfuscated-outjar @@ -131,9 +132,15 @@ - net.sf.proguard + com.guardsquare + proguard-core + ${proguardVersion} + runtime + + + com.guardsquare proguard-base - 6.2.2 + ${proguardVersion} runtime diff --git a/gson/src/test/resources/testcases-proguard.conf b/gson/src/test/resources/testcases-proguard.conf index d42da0ab..19def61b 100644 --- a/gson/src/test/resources/testcases-proguard.conf +++ b/gson/src/test/resources/testcases-proguard.conf @@ -3,6 +3,8 @@ -optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/* -optimizationpasses 5 -allowaccessmodification +# On Windows mixed case class names might cause problems +-dontusemixedcaseclassnames -keepattributes *Annotation*,Signature,InnerClasses,EnclosingMethod -keepclassmembers enum * { public static **[] values(); @@ -17,4 +19,5 @@ -dontwarn com.google.gson.functional.EnumWithObfuscatedTest -dontwarn junit.framework.TestCase - +# Ignore notes about duplicate JDK classes +-dontnote module-info,jdk.internal.** diff --git a/pom.xml b/pom.xml index f36f0b05..19a65698 100644 --- a/pom.xml +++ b/pom.xml @@ -102,6 +102,7 @@ org.apache.maven.plugins maven-jar-plugin + 3.2.0 org.apache.felix