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

chore: use Gradle toolchains for JDK provisioning #5989

Merged
merged 1 commit into from
Jun 24, 2023
Merged

Conversation

vlsi
Copy link
Collaborator

@vlsi vlsi commented Jun 17, 2023

Description

It enables automatic JDK provisioning (e.g. download), and it enables using different JDKs for executing Gradle and for building JMeter.

The target bytecode is still 1.8 (it would be nice to bump the minimum requirements to Java 11), however, the build would require JDK 17 (it would automatically download one if none is detected locally)

Java version can be specified when building with -PjdkVersion=11

You could use ./gradlew -q javaToolchains to list the detected toolchains.

See https://docs.gradle.org/8.0/userguide/toolchains.html#sec:consuming

Fixes #5986

@vlsi vlsi added the chore label Jun 17, 2023
@vlsi vlsi added this to the 5.7 milestone Jun 17, 2023
@vlsi vlsi force-pushed the toolchain branch 4 times, most recently from 8e5122d to 3e90051 Compare June 18, 2023 14:47
@vlsi
Copy link
Collaborator Author

vlsi commented Jun 18, 2023

It looks like we might need several JVMs:

  1. "build JDK" which is a JDK that compiles the code
  2. "test JDK" which is a JDK for executing tests

It would enable trying Java 21 even though it does not support building with --release 8.

Since Java 8, and even Java 11 are not updated that often, I would suggest we use Java 17 for build purposes, and then we vary "test JDKs".

It enables automatic JDK provisioning (e.g. download), and it enables
using different JDKs for executing Gradle and for building JMeter

Java version can be specified when building with -PjdkVersion=11

You could use ./gradlew -q javaToolchains to list the detected toolchains.

See https://docs.gradle.org/8.0/userguide/toolchains.html#sec:consuming

Fixes apache#5986
@vlsi vlsi merged commit 1ee08f4 into apache:master Jun 24, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Gradle Java toolchains, and add testing with early access Java versions
1 participant