Try local-only Proguard optimization for core library

This commit is contained in:
Sean Owen 2016-06-08 18:40:27 +01:00
parent b40dd94843
commit b1f4b5a269
2 changed files with 48 additions and 1 deletions

View file

@ -35,6 +35,15 @@
<version>3.2.2-SNAPSHOT</version>
</parent>
<build>
<plugins>
<plugin>
<groupId>com.github.wvengen</groupId>
<artifactId>proguard-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<name>ZXing Core</name>
<description>Core barcode encoding/decoding library</description>

40
pom.xml
View file

@ -95,6 +95,7 @@
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.7</java.version>
<maven.version.min>3.2.1</maven.version.min>
<proguard.version>5.2.1</proguard.version>
<slf4j.version>1.7.21</slf4j.version>
<!-- This can't reference project.version as some subprojects version differently -->
<zxing.version>3.2.2-SNAPSHOT</zxing.version>
@ -381,7 +382,44 @@
<dependency>
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-base</artifactId>
<version>5.2.1</version>
<version>${proguard.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>com.github.wvengen</groupId>
<artifactId>proguard-maven-plugin</artifactId>
<version>2.0.12</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>proguard</goal>
</goals>
</execution>
</executions>
<configuration>
<proguardVersion>${proguard.version}</proguardVersion>
<addMavenDescriptor>true</addMavenDescriptor>
<obfuscate>false</obfuscate>
<options>
<option>-target ${java.version}</option>
<option>-dontshrink</option>
<option>-keep class * { !private *; }</option>
<option>-verbose</option>
<option>-optimizationpasses 3</option>
<option>-optimizations !code/simplification/cast,!code/allocation/variable,!field/*,!class/*,!method/*</option>
</options>
<libs>
<lib>${java.home}/lib/rt.jar</lib>
</libs>
</configuration>
<dependencies>
<dependency>
<groupId>net.sf.proguard</groupId>
<artifactId>proguard-base</artifactId>
<version>${proguard.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</plugin>