proguard-maven-plugin icon indicating copy to clipboard operation
proguard-maven-plugin copied to clipboard

Update this for Java 19

Open valimaties opened this issue 1 year ago • 4 comments

Please someone, could this be updated to Java 19? I use Liberica 19.0.2.1 for my projects and seems this proguard is not compatible with the Java 19. (class version 63).

I get this error when I'm trying to package my project:

Unsupported version number [63.0] (maximum 62.65535, Java 18)

The plugin used in pom file:

<plugin>
    <groupId>com.github.wvengen</groupId>
    <artifactId>proguard-maven-plugin</artifactId>
    <version>2.6.0</version>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>proguard</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Thanks

valimaties avatar Apr 25 '23 07:04 valimaties

Hi. Here https://github.com/wvengen/proguard-maven-plugin/blob/master/pom.xml#L11 you can see the default Proguard version.

See also https://wvengen.github.io/proguard-maven-plugin/ on how to use a different version than the default one.

If you want to update the default version, you can modify https://github.com/wvengen/proguard-maven-plugin/blob/master/pom.xml#L11 and open a pull request. I am happy to merge such updates.

lasselindqvist avatar Apr 25 '23 07:04 lasselindqvist

~~Sorry, I don't understand, as I'm a beginner in JavaFX Maven. I use the plugin tag that I wrote in the above post for this maven plugin. What shoud I have to change? because if I change the version to 2.6.1-SNAPSHOT the IDE cannot find it when it tries to download it.~~

Ok, I've see now how to use different proguard-base, down in that page. But using newest version it gives me an error:

[proguard] Exception in thread "main" java.lang.NoSuchMethodError: 'void proguard.io.ClassReader.<init>(boolean, boolean, boolean, boolean, boolean, proguard.classfile.util.WarningPrinter, proguard.classfile.visitor.ClassVisitor)'
 [proguard] 	at proguard.InputReader.execute(InputReader.java:93)
 [proguard] 	at proguard.pass.PassRunner.run(PassRunner.java:24)
 [proguard] 	at proguard.ProGuard.readInput(ProGuard.java:333)
 [proguard] 	at proguard.ProGuard.execute(ProGuard.java:124)
 [proguard] 	at proguard.ProGuard.main(ProGuard.java:651)
 [proguard] ProGuard, version 7.3.2Reading input...

valimaties avatar Apr 25 '23 08:04 valimaties

... any idea?

valimaties avatar Apr 26 '23 21:04 valimaties

You probably also need to upgrade proguard-core (e.g. 9.0.8 for the 7.3.2 base version):

          <dependency>
            <groupId>com.guardsquare</groupId>
            <artifactId>proguard-core</artifactId>
            <version>9.0.8</version>
            <scope>runtime</scope>
          </dependency>

andrew-wils avatar Apr 27 '23 13:04 andrew-wils