Skip to content

Commit

Permalink
Configure auto-provisioning of JDK toolchain for Gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcono1234 committed Sep 24, 2024
1 parent af045db commit bd0ed69
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ jobs:
uses: gradle/actions/setup-gradle@v4

- name: Build and test
run: ./gradlew build
# Don't automatically download JDK toolchain; existing JDK of this workflow should be compatible
run: ./gradlew build -Porg.gradle.java.installations.auto-download=false

- name: Check accuracy reports regression
id: check-accuracy-reports
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
echo "Version: ${version}"
- name: Create release artifacts
run: ./gradlew jar shadowJar sourcesJar dokkaJavadocJar dokkaHtmlJar
# Don't automatically download JDK toolchain; existing JDK of this workflow should be compatible
run: ./gradlew jar shadowJar sourcesJar dokkaJavadocJar dokkaHtmlJar -Porg.gradle.java.installations.auto-download=false

- name: Create release and upload artifacts
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
Expand Down
5 changes: 5 additions & 0 deletions buildSrc/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ dependencyResolutionManagement {
}
}
}

// Automatically download JDK toolchain if necessary, see https://docs.gradle.org/8.10.1/userguide/toolchains.html#sec:provisioning
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}

0 comments on commit bd0ed69

Please sign in to comment.