Home > OS >  Gradle generated Unsupported class file major version 63
Gradle generated Unsupported class file major version 63

Time:12-21

I'm trying to migrate from Java 8 to Java 17 and I'm having some issues with Gradle.

Here is my java version:

openjdk 17.0.5 2022-10-18 LTS
OpenJDK Runtime Environment Corretto-17.0.5.8.1 (build 17.0.5 8-LTS)
OpenJDK 64-Bit Server VM Corretto-17.0.5.8.1 (build 17.0.5 8-LTS, mixed mode, sharing)

Here is my gradle version

------------------------------------------------------------
Gradle 7.5.1
------------------------------------------------------------

Build time:   2022-08-05 21:17:56 UTC
Revision:     d1daa0cbf1a0103000b71484e1dbfe096e095918

Kotlin:       1.6.21
Groovy:       3.0.10
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          17.0.5 (Amazon.com Inc. 17.0.5 8-LTS)
OS:           Windows 10 10.0 amd64

I'm also using Eclipse 2022-12 and when I try to get a list of tasks with the Gradle plugin, I get

Execution failed for task ':buildSrc:compileGroovyPlugins'.
> BUG! exception in phase 'semantic analysis' in source unit 'precompiled_ProjectbJavaConventions' Unsupported class file major version 63

Any idea of how to fix this... Thanks!

CodePudding user response:

I fixed the issue upgrading Gradle to 7.6

------------------------------------------------------------
Gradle 7.6
------------------------------------------------------------

Build time:   2022-11-25 13:35:10 UTC
Revision:     daece9dbc5b79370cc8e4fd6fe4b2cd400e150a8

Kotlin:       1.7.10
Groovy:       3.0.13
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          17.0.5 (Amazon.com Inc. 17.0.5 8-LTS)
OS:           Windows 10 10.0 amd64
  • Related