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

Use Maven toolchains.xml to register pre-installed JDKs as java toolchains #1026

Merged
merged 3 commits into from
Jan 4, 2024

Conversation

bigdaz
Copy link
Member

@bigdaz bigdaz commented Jan 4, 2024

No description provided.

bigdaz added 3 commits January 3, 2024 18:49
The written property will override any project-level setting, which
can lead to confusing behaviour.

Fixes #1024
Since adding these to the `org.gradle.java.installations.fromEnv` property
is problematic (#1024), this mechanism allows the default toolchains to
be discovered by Gradle via a different mechanism.

The default JDK installations are added to `~/.m2/toolchains.xml` such that
they are discoverable by Gradle toolchain support.
The `setup-java` action also writes to this file, so we merge with any existing
content: this allows both pre-installed and "setup" JDKs to be automatically
detected by Gradle.
@bigdaz bigdaz self-assigned this Jan 4, 2024
Copy link

github-actions bot commented Jan 4, 2024

Job Summary for gradle-build-action

Demo adding Build Scan® comment to PR :: successful-build-with-always-comment
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
kotlin-dsl build 8.5 Build Scan PUBLISHED

Copy link

github-actions bot commented Jan 4, 2024

Job Summary for gradle-build-action

Demo adding Build Scan® comment to PR :: failing-build-with-comment-on-failure
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
kotlin-dsl no-a-real-task 8.5 Build Scan PUBLISHED

@bigdaz bigdaz merged commit 6c75372 into main Jan 4, 2024
225 checks passed
@bigdaz bigdaz deleted the dd/java-toolchains branch January 4, 2024 04:34
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.

1 participant