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

Support for Java 17 #114

Open
onukristo opened this issue May 11, 2022 · 1 comment
Open

Support for Java 17 #114

onukristo opened this issue May 11, 2022 · 1 comment

Comments

@onukristo
Copy link

onukristo commented May 11, 2022

With

buildscript {
	dependencies {
		classpath "org.grails:grails-gradle-plugin:5.1.4"
	}
}

sourceCompatibility = 17
targetCompatibility = 17

on JDK 17, we get an error on ./gradlew assemble.

* What went wrong:
Execution failed for task ':my-service:findMainClass'.
> Unsupported class file major version 61

With

buildscript {
	dependencies {
		classpath "org.grails:grails-gradle-plugin:5.1.4"
		// To support JDK 17. Try to remove each time you upgrade grails-gradle-plugin.
		classpath "org.codehaus.groovy:groovy:3.0.10"
	}
}

it works.

Please remove the need to manually add classpath "org.codehaus.groovy:groovy:3.0.10" line.


./gradlew --version

------------------------------------------------------------
Gradle 7.4.2
------------------------------------------------------------

Build time:   2022-03-31 15:25:29 UTC
Revision:     540473b8118064efcc264694cbcaa4b677f61041

Kotlin:       1.5.31
Groovy:       3.0.9
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          17.0.3 (Azul Systems, Inc. 17.0.3+7-LTS)
OS:           Linux 5.11.0-37-generic amd64
@arixmkii
Copy link

arixmkii commented Jun 3, 2022

You can try gradle 7.5-rc1, which includes Groovy 3.0.10

% gradle -v

------------------------------------------------------------
Gradle 7.5-rc-1
------------------------------------------------------------

Build time:   2022-05-12 19:09:23 UTC
Revision:     8d531f6b22fb3a97fb623f949c5e7bae8a2e1fe2

Kotlin:       1.6.21
Groovy:       3.0.10
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          18.0.1 (Eclipse Adoptium 18.0.1+10)
OS:           Mac OS X 12.4 aarch64

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

2 participants