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

Bump JDK running Gradle from 11 to 17 #9

Merged
merged 1 commit into from Nov 29, 2021
Merged

Conversation

rognan
Copy link
Owner

@rognan rognan commented Nov 28, 2021

This commit decouples the JDK running Gradle from the one building the
project.

Gradle will by default use the same JDK for building the project as it
does for running Gradle. Newer JDKs are assumed to be more performant,
contain fewer bugs and to come with desirable features that we would
like to utilize in our build, but doing so should not endanger
backwards compatibility for the plugin itself. We can do that now by
utilizing Gradle toolchains, which allows us to use one JDK/JRE for
running Gradle and the other for building the project, i.e. executing
`javac`.

Doing this requires us to make multiple JDKs available to the Gradle
build action for each individual execution of the build. The setup-java
action doesn't support this at the moment, and the multiple build steps
configured for actions/setup-java in this commit is at best a
workaround for this, and at worst a bad assumption with respect to
environment variables or other settings being overwritten. Furthermore,
there's no handling of duplicate invocations of the action.

Hopefully both actions/setup-java and gradle/gradle-build-action will
handle all of this gracefully.

@rognan rognan force-pushed the bump-build-from-java-11-to-17 branch from 19462d2 to b9a3244 Compare November 28, 2021 20:51
@rognan rognan changed the title Decouple JDK running Gradle from JDK building project Bump JDK running Gradle from 11 to 17 Nov 28, 2021
@rognan rognan force-pushed the bump-build-from-java-11-to-17 branch from 33225c4 to 665acd0 Compare November 28, 2021 21:40
This commit decouples the JDK running Gradle from the one building the
project.

Gradle will by default use the same JDK for building the project as it
does for running Gradle. Newer JDKs are assumed to be more performant,
contain fewer bugs and to come with desirable features that we would
like to utilize in our build, but doing so should not endanger
backwards compatibility for the plugin itself. We can do that now by
utilizing Gradle toolchains, which allows us to use one JDK/JRE for
running Gradle and the other for building the project, i.e. executing
`javac`.

Doing this requires us to make multiple JDKs available to the Gradle
build action for each individual execution of the build. The setup-java
action doesn't support this at the moment, and the multiple build steps
configured for actions/setup-java in this commit is at best a
workaround for this, and at worst a bad assumption with respect to
environment variables or other settings being overwritten. Furthermore,
there's no handling of duplicate invocations of the action.

Hopefully both actions/setup-java and gradle/gradle-build-action will
handle all of this gracefully.

For more details, see:
- actions/setup-java#44
- gradle/gradle#14903
@rognan rognan force-pushed the bump-build-from-java-11-to-17 branch from fd350dc to c93a0e7 Compare November 29, 2021 16:22
@rognan rognan merged commit a075730 into main Nov 29, 2021
@rognan rognan deleted the bump-build-from-java-11-to-17 branch November 29, 2021 16:48
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

Successfully merging this pull request may close these issues.

None yet

1 participant