Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update this for Java 19 #262

Open
valimaties opened this issue Apr 25, 2023 · 4 comments
Open

Update this for Java 19 #262

valimaties opened this issue Apr 25, 2023 · 4 comments

Comments

@valimaties
Copy link

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

@lasselindqvist
Copy link
Collaborator

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.

@valimaties
Copy link
Author

valimaties commented Apr 25, 2023

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
Copy link
Author

... any idea?

@andrew-wils
Copy link

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants