-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Quarkus CLI doesn't honor --java=21 for gradle projects #37047
Comments
/cc @ebullient (cli), @evanchooly (kotlin), @geoand (kotlin), @glefloch, @maxandersen (cli,jbang), @quarkusio/devtools (jbang) |
I was able to reproduce it, this is unexpected, I will have a look. |
@gsmet did we add support for j21 in the codestarts? I thought we didn't have the docker images? |
the issue are the qute templates for build-layout for gradle have hardcoded java17 and java11 |
Because we didn't yet add support for J21 project creation (AFAIK). |
Well, we shouldn't have to as the JDK is resolved dynamically. It works for Maven but not for Gradle as it was more or less hardcoded. I'll fix it. |
Also add tests for Java 21. Fixes quarkusio#37047
PR is here: #37051 |
Also add tests for Java 21. Fixes quarkusio#37047
Also add tests for Java 21. Fixes quarkusio#37047
Also add tests for Java 21. Fixes quarkusio#37047
Describe the bug
The Quarkus CLI does not honor the argument --java=21 for gradle projects.
--java=17 works, but 21 gets created to use java 11.
quarkus create app org.acme:myproject
--extension='resteasy-reactive' --java=21 --gradle-kotlin-dsl --verbose
quarkus create app org.acme:myproject
--extension='resteasy-reactive' --java=21 --gradle --verbose
For the previous two commands the project gets created, but inspecting the file
build.gradle
orbuild.gradle.kts
is still using java 11.If --java=17 is specified then it works as expected
Expected behavior
starter project gradle file is configured to use java 21
Actual behavior
starter project gradle file is configured to use java 11
How to Reproduce?
Reproducer:
Steps to reproduce
Run the following commands
quarkus create app org.acme:myproject --extension='resteasy-reactive' --java=21 --gradle-kotlin-dsl --verbose
output:
cd myproject
grep JavaVersion build.gradle.kts
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
Output of
uname -a
orver
inux mybox 6.2.0-36-generic #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "21" 2023-09-19 OpenJDK Runtime Environment GraalVM CE 21+35.1 (build 21+35-jvmci-23.1-b15) OpenJDK 64-Bit Server VM GraalVM CE 21+35.1 (build 21+35-jvmci-23.1-b15, mixed mode, sharing)
Quarkus version or git rev
3.5.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)Gradle 8.4 ------------------------------------------------------------ Build time: 2023-10-04 20:52:13 UTC Revision: e9251e572c9bd1d01e503a0dfdf43aedaeecdc3f Kotlin: 1.9.10 Groovy: 3.0.17 Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023 JVM: 21 (GraalVM Community 21+35-jvmci-23.1-b15) OS: Linux 6.2.0-36-generic amd64
Additional information
No response
The text was updated successfully, but these errors were encountered: