diff --git a/.gitignore b/.gitignore index 54aaff7..64fc6ff 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,6 @@ __init__.pyc .cache/ .ipynb_checkpoints/ .vscode/ + +# Gradle JDKs setup +!gradle/* diff --git a/build.gradle b/build.gradle index 4b416f5..84a0ae6 100644 --- a/build.gradle +++ b/build.gradle @@ -40,6 +40,7 @@ apply plugin: 'com.palantir.failure-reports' apply plugin: 'com.palantir.baseline' apply plugin: 'com.palantir.consistent-versions' apply plugin: 'com.palantir.git-version' +apply plugin: 'com.palantir.jdks' apply plugin: 'com.palantir.revapi' apply plugin: 'com.palantir.baseline-java-versions' apply plugin: 'com.palantir.jdks.latest' @@ -78,3 +79,7 @@ javaVersions { libraryTarget = 11 runtime = 21 } + +jdks { + daemonTarget = 17 +} diff --git a/gradle.properties b/gradle.properties index f010229..223255d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,4 @@ org.gradle.parallel=true org.gradle.caching=true org.gradle.jvmargs = --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED +palantir.jdk.setup.enabled=true diff --git a/gradle/gradle-daemon-jdk-version b/gradle/gradle-daemon-jdk-version new file mode 100644 index 0000000..98d9bcb --- /dev/null +++ b/gradle/gradle-daemon-jdk-version @@ -0,0 +1 @@ +17 diff --git a/gradle/gradle-jdks-functions.sh b/gradle/gradle-jdks-functions.sh new file mode 100755 index 0000000..49eb3d1 --- /dev/null +++ b/gradle/gradle-jdks-functions.sh @@ -0,0 +1,166 @@ +#!/bin/sh + +set -e +# Set pipefail if it works in a subshell, disregard if unsupported +# shellcheck disable=SC3040 +if (set -o pipefail 2>/dev/null); then + set -o pipefail +fi +# +# (c) Copyright 2024 Palantir Technologies Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +TMP_WORK_DIR=$(mktemp -d) +export TMP_WORK_DIR + +cleanup() { + [ -d "$TMP_WORK_DIR" ] && rm -rf "$TMP_WORK_DIR" +} + +die() { + echo + echo "$*" + echo + cleanup + exit 1 +} >&2 + +read_value() { + if [ ! -f "$1" ]; then + die "ERROR: $1 not found, aborting Gradle JDK setup" + fi + read -r value < "$1" || die "ERROR: Unable to read value from $1. Make sure the file ends with a newline." + echo "$value" +} + +get_os() { + # OS specific support; same as gradle-jdks:com.palantir.gradle.jdks.setup.common.CurrentOs.java + case "$( uname )" in #( + Linux* ) os_name="linux" ;; #( + Darwin* ) os_name="macos" ;; #( + * ) die "ERROR Unsupported OS: $( uname )" ;; + esac + + if [ "$os_name" = "linux" ]; then + ldd_output=$(ldd --version 2>&1 || true) + if echo "$ldd_output" | grep -qi glibc; then + os_name="linux-glibc" + elif echo "$ldd_output" | grep -qi "gnu libc"; then + os_name="linux-glibc" + elif echo "$ldd_output" | grep -qi musl; then + os_name="linux-musl" + else + die "Unable to determine glibc or musl based Linux distribution: ldd_output: $ldd_output" + fi + fi + + echo "$os_name" +} + +get_arch() { + # Arch specific support, see: gradle-jdks:com.palantir.gradle.jdks.setup.common.CurrentArch.java + case "$(uname -m)" in #( + x86_64* ) arch_name="x86-64" ;; #( + x64* ) arch_name="x86-64" ;; #( + amd64* ) arch_name="x86-64" ;; #( + arm64* ) arch_name="aarch64" ;; #( + arm* ) arch_name="aarch64" ;; #( + aarch64* ) arch_name="aarch64" ;; #( + x86* ) arch_name="x86" ;; #( + i686* ) arch_name="x86" ;; #( + * ) die "ERROR Unsupported architecture: $( uname -m )" ;; + esac + + echo "$arch_name" +} + +get_gradle_jdks_home() { + gradle_user_home=${GRADLE_USER_HOME:-"$HOME"/.gradle} + gradle_jdks_home="$gradle_user_home"/gradle-jdks + echo "$gradle_jdks_home" +} + +get_java_home() { + java_bin=$(find "$1" -type f -name "java" -path "*/bin/java" ! -type l -print -quit) + echo "${java_bin%/*/*}" +} + +GRADLE_JDKS_HOME=$(get_gradle_jdks_home) +mkdir -p "$GRADLE_JDKS_HOME" +export GRADLE_JDKS_HOME + +OS=$(get_os) +export OS + +ARCH=$(get_arch) +export ARCH + +install_and_setup_jdks() { + gradle_dir=$1 + scripts_dir=${2:-"$1"} + + for dir in "$gradle_dir"/jdks/*/; do + major_version_dir=${dir%*/} + major_version=${major_version_dir##*/} + if [ "$major_version" = "8" ]; then + echo "Skipping JDK 8 installation as it is not supported by Gradle JDKs Setup." + continue + fi + distribution_local_path=$(read_value "$major_version_dir"/"$OS"/"$ARCH"/local-path) + distribution_url=$(read_value "$major_version_dir"/"$OS"/"$ARCH"/download-url) + # Check if distribution exists in $GRADLE_JDKS_HOME + jdk_installation_directory="$GRADLE_JDKS_HOME"/"$distribution_local_path" + if [ ! -d "$jdk_installation_directory" ]; then + # Download and extract the distribution into a temporary directory + echo "JDK installation '$jdk_installation_directory' does not exist, installing '$distribution_url' in progress ..." + in_progress_dir="$TMP_WORK_DIR/$distribution_local_path.in-progress" + mkdir -p "$in_progress_dir" + cd "$in_progress_dir" || die "failed to change dir to $in_progress_dir" + if command -v curl > /dev/null 2>&1; then + echo "Using curl to download $distribution_url" + case "$distribution_url" in + *.zip) + distribution_name=${distribution_url##*/} + curl -C - "$distribution_url" -o "$distribution_name" + tar -xzf "$distribution_name" + ;; + *) + curl -C - "$distribution_url" | tar -xzf - + ;; + esac + elif command -v wget > /dev/null 2>&1; then + echo "Using wget to download $distribution_url" + case "$distribution_url" in + *.zip) + distribution_name=${distribution_url##*/} + wget -c "$distribution_url" -O "$distribution_name" + tar -xzf "$distribution_name" + ;; + *) + wget -qO- -c "$distribution_url" | tar -xzf - + ;; + esac + else + die "ERROR: Neither curl nor wget are installed, Could not set up JAVA_HOME" + fi + cd - || exit + + # Finding the java_home + java_home=$(get_java_home "$in_progress_dir") + "$java_home"/bin/java -cp "$scripts_dir"/gradle-jdks-setup.jar com.palantir.gradle.jdks.setup.GradleJdkInstallationSetup jdkSetup "$jdk_installation_directory" || die "Failed to set up JDK $jdk_installation_directory" + echo "Successfully installed JDK distribution in $jdk_installation_directory" + fi + done +} diff --git a/gradle/gradle-jdks-setup.jar b/gradle/gradle-jdks-setup.jar new file mode 100644 index 0000000..3a74e33 Binary files /dev/null and b/gradle/gradle-jdks-setup.jar differ diff --git a/gradle/gradle-jdks-setup.sh b/gradle/gradle-jdks-setup.sh new file mode 100755 index 0000000..f8cd657 --- /dev/null +++ b/gradle/gradle-jdks-setup.sh @@ -0,0 +1,79 @@ +#!/bin/sh +# +# (c) Copyright 2024 Palantir Technologies Inc. All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle jdk set up script for POSIX generated by gradle-jdks. +# +# This script does the following: +# (1) Downloads all the JDK distributions that are present in `gradle/jdks` +# (2) Installs the distributions in a temporary directory +# (3) Calls the java class `GradleJdkInstallationSetup` that will move each distribution to +# `$GRADLE_USER_HOME/${local_path}` based on the local_path=`gradle/jdks/${majorVersion}/${os}/${arch}/local_path` +# and it will set up the certificates based on `gradle/certs` entries for the locally installed distribution +# (4) Sets `org.gradle.java.home` to the JDK distribution that is used by the Gradle Daemon +# +# +# Important for running: +# This script requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command» and «set». +# +############################################################################## + +set -e +# Set pipefail if it works in a subshell, disregard if unsupported +# shellcheck disable=SC3040 +if (set -o pipefail 2>/dev/null); then + set -o pipefail +fi + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +APP_HOME=${APP_HOME%/gradle} +APP_GRADLE_DIR="$APP_HOME"/gradle + +# Loading gradle jdk functions +. "$APP_GRADLE_DIR"/gradle-jdks-functions.sh + +install_and_setup_jdks "$APP_GRADLE_DIR" + +gradle_daemon_jdk_version=$(read_value "$APP_GRADLE_DIR"/gradle-daemon-jdk-version) +gradle_daemon_jdk_distribution_local_path=$(read_value "$APP_GRADLE_DIR"/jdks/"$gradle_daemon_jdk_version"/"$OS"/"$ARCH"/local-path) +"$GRADLE_JDKS_HOME"/"$gradle_daemon_jdk_distribution_local_path"/bin/java -cp "$APP_GRADLE_DIR"/gradle-jdks-setup.jar com.palantir.gradle.jdks.setup.GradleJdkInstallationSetup daemonSetup "$APP_HOME" "$GRADLE_JDKS_HOME/$gradle_daemon_jdk_distribution_local_path" + +# [Used by ./gradlew only] Setting the Gradle Daemon Java Home to the JDK distribution +set -- "-Dorg.gradle.java.home=$GRADLE_JDKS_HOME/$gradle_daemon_jdk_distribution_local_path" "$@" + +cleanup diff --git a/gradle/jdks/11/linux-glibc/aarch64/download-url b/gradle/jdks/11/linux-glibc/aarch64/download-url new file mode 100644 index 0000000..b6229d7 --- /dev/null +++ b/gradle/jdks/11/linux-glibc/aarch64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/11.0.24.8.1/amazon-corretto-11.0.24.8.1-linux-aarch64.tar.gz diff --git a/gradle/jdks/11/linux-glibc/aarch64/local-path b/gradle/jdks/11/linux-glibc/aarch64/local-path new file mode 100644 index 0000000..664fc73 --- /dev/null +++ b/gradle/jdks/11/linux-glibc/aarch64/local-path @@ -0,0 +1 @@ +amazon-corretto-11.0.24.8.1 diff --git a/gradle/jdks/11/linux-glibc/x86-64/download-url b/gradle/jdks/11/linux-glibc/x86-64/download-url new file mode 100644 index 0000000..aa310f0 --- /dev/null +++ b/gradle/jdks/11/linux-glibc/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/11.0.24.8.1/amazon-corretto-11.0.24.8.1-linux-x64.tar.gz diff --git a/gradle/jdks/11/linux-glibc/x86-64/local-path b/gradle/jdks/11/linux-glibc/x86-64/local-path new file mode 100644 index 0000000..664fc73 --- /dev/null +++ b/gradle/jdks/11/linux-glibc/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-11.0.24.8.1 diff --git a/gradle/jdks/11/linux-glibc/x86/download-url b/gradle/jdks/11/linux-glibc/x86/download-url new file mode 100644 index 0000000..d504a5e --- /dev/null +++ b/gradle/jdks/11/linux-glibc/x86/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/11.0.24.8.1/amazon-corretto-11.0.24.8.1-linux-i386.tar.gz diff --git a/gradle/jdks/11/linux-glibc/x86/local-path b/gradle/jdks/11/linux-glibc/x86/local-path new file mode 100644 index 0000000..664fc73 --- /dev/null +++ b/gradle/jdks/11/linux-glibc/x86/local-path @@ -0,0 +1 @@ +amazon-corretto-11.0.24.8.1 diff --git a/gradle/jdks/11/linux-musl/aarch64/download-url b/gradle/jdks/11/linux-musl/aarch64/download-url new file mode 100644 index 0000000..65ddd14 --- /dev/null +++ b/gradle/jdks/11/linux-musl/aarch64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/11.0.24.8.1/amazon-corretto-11.0.24.8.1-alpine-linux-aarch64.tar.gz diff --git a/gradle/jdks/11/linux-musl/aarch64/local-path b/gradle/jdks/11/linux-musl/aarch64/local-path new file mode 100644 index 0000000..664fc73 --- /dev/null +++ b/gradle/jdks/11/linux-musl/aarch64/local-path @@ -0,0 +1 @@ +amazon-corretto-11.0.24.8.1 diff --git a/gradle/jdks/11/linux-musl/x86-64/download-url b/gradle/jdks/11/linux-musl/x86-64/download-url new file mode 100644 index 0000000..3ccb905 --- /dev/null +++ b/gradle/jdks/11/linux-musl/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/11.0.24.8.1/amazon-corretto-11.0.24.8.1-alpine-linux-x64.tar.gz diff --git a/gradle/jdks/11/linux-musl/x86-64/local-path b/gradle/jdks/11/linux-musl/x86-64/local-path new file mode 100644 index 0000000..664fc73 --- /dev/null +++ b/gradle/jdks/11/linux-musl/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-11.0.24.8.1 diff --git a/gradle/jdks/11/macos/aarch64/download-url b/gradle/jdks/11/macos/aarch64/download-url new file mode 100644 index 0000000..b1f3be5 --- /dev/null +++ b/gradle/jdks/11/macos/aarch64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/11.0.24.8.1/amazon-corretto-11.0.24.8.1-macosx-aarch64.tar.gz diff --git a/gradle/jdks/11/macos/aarch64/local-path b/gradle/jdks/11/macos/aarch64/local-path new file mode 100644 index 0000000..664fc73 --- /dev/null +++ b/gradle/jdks/11/macos/aarch64/local-path @@ -0,0 +1 @@ +amazon-corretto-11.0.24.8.1 diff --git a/gradle/jdks/11/macos/x86-64/download-url b/gradle/jdks/11/macos/x86-64/download-url new file mode 100644 index 0000000..69bbff5 --- /dev/null +++ b/gradle/jdks/11/macos/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/11.0.24.8.1/amazon-corretto-11.0.24.8.1-macosx-x64.tar.gz diff --git a/gradle/jdks/11/macos/x86-64/local-path b/gradle/jdks/11/macos/x86-64/local-path new file mode 100644 index 0000000..664fc73 --- /dev/null +++ b/gradle/jdks/11/macos/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-11.0.24.8.1 diff --git a/gradle/jdks/11/windows/x86-64/download-url b/gradle/jdks/11/windows/x86-64/download-url new file mode 100644 index 0000000..280a489 --- /dev/null +++ b/gradle/jdks/11/windows/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/11.0.24.8.1/amazon-corretto-11.0.24.8.1-windows-x64-jdk.zip diff --git a/gradle/jdks/11/windows/x86-64/local-path b/gradle/jdks/11/windows/x86-64/local-path new file mode 100644 index 0000000..664fc73 --- /dev/null +++ b/gradle/jdks/11/windows/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-11.0.24.8.1 diff --git a/gradle/jdks/11/windows/x86/download-url b/gradle/jdks/11/windows/x86/download-url new file mode 100644 index 0000000..cdb4c2f --- /dev/null +++ b/gradle/jdks/11/windows/x86/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/11.0.24.8.1/amazon-corretto-11.0.24.8.1-windows-i386-jdk.zip diff --git a/gradle/jdks/11/windows/x86/local-path b/gradle/jdks/11/windows/x86/local-path new file mode 100644 index 0000000..664fc73 --- /dev/null +++ b/gradle/jdks/11/windows/x86/local-path @@ -0,0 +1 @@ +amazon-corretto-11.0.24.8.1 diff --git a/gradle/jdks/17/linux-glibc/aarch64/download-url b/gradle/jdks/17/linux-glibc/aarch64/download-url new file mode 100644 index 0000000..d434357 --- /dev/null +++ b/gradle/jdks/17/linux-glibc/aarch64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/17.0.12.7.1/amazon-corretto-17.0.12.7.1-linux-aarch64.tar.gz diff --git a/gradle/jdks/17/linux-glibc/aarch64/local-path b/gradle/jdks/17/linux-glibc/aarch64/local-path new file mode 100644 index 0000000..b55ee1d --- /dev/null +++ b/gradle/jdks/17/linux-glibc/aarch64/local-path @@ -0,0 +1 @@ +amazon-corretto-17.0.12.7.1 diff --git a/gradle/jdks/17/linux-glibc/x86-64/download-url b/gradle/jdks/17/linux-glibc/x86-64/download-url new file mode 100644 index 0000000..f321979 --- /dev/null +++ b/gradle/jdks/17/linux-glibc/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/17.0.12.7.1/amazon-corretto-17.0.12.7.1-linux-x64.tar.gz diff --git a/gradle/jdks/17/linux-glibc/x86-64/local-path b/gradle/jdks/17/linux-glibc/x86-64/local-path new file mode 100644 index 0000000..b55ee1d --- /dev/null +++ b/gradle/jdks/17/linux-glibc/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-17.0.12.7.1 diff --git a/gradle/jdks/17/linux-musl/aarch64/download-url b/gradle/jdks/17/linux-musl/aarch64/download-url new file mode 100644 index 0000000..ef000db --- /dev/null +++ b/gradle/jdks/17/linux-musl/aarch64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/17.0.12.7.1/amazon-corretto-17.0.12.7.1-alpine-linux-aarch64.tar.gz diff --git a/gradle/jdks/17/linux-musl/aarch64/local-path b/gradle/jdks/17/linux-musl/aarch64/local-path new file mode 100644 index 0000000..b55ee1d --- /dev/null +++ b/gradle/jdks/17/linux-musl/aarch64/local-path @@ -0,0 +1 @@ +amazon-corretto-17.0.12.7.1 diff --git a/gradle/jdks/17/linux-musl/x86-64/download-url b/gradle/jdks/17/linux-musl/x86-64/download-url new file mode 100644 index 0000000..65cf11f --- /dev/null +++ b/gradle/jdks/17/linux-musl/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/17.0.12.7.1/amazon-corretto-17.0.12.7.1-alpine-linux-x64.tar.gz diff --git a/gradle/jdks/17/linux-musl/x86-64/local-path b/gradle/jdks/17/linux-musl/x86-64/local-path new file mode 100644 index 0000000..b55ee1d --- /dev/null +++ b/gradle/jdks/17/linux-musl/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-17.0.12.7.1 diff --git a/gradle/jdks/17/macos/aarch64/download-url b/gradle/jdks/17/macos/aarch64/download-url new file mode 100644 index 0000000..a961039 --- /dev/null +++ b/gradle/jdks/17/macos/aarch64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/17.0.12.7.1/amazon-corretto-17.0.12.7.1-macosx-aarch64.tar.gz diff --git a/gradle/jdks/17/macos/aarch64/local-path b/gradle/jdks/17/macos/aarch64/local-path new file mode 100644 index 0000000..b55ee1d --- /dev/null +++ b/gradle/jdks/17/macos/aarch64/local-path @@ -0,0 +1 @@ +amazon-corretto-17.0.12.7.1 diff --git a/gradle/jdks/17/macos/x86-64/download-url b/gradle/jdks/17/macos/x86-64/download-url new file mode 100644 index 0000000..a083a30 --- /dev/null +++ b/gradle/jdks/17/macos/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/17.0.12.7.1/amazon-corretto-17.0.12.7.1-macosx-x64.tar.gz diff --git a/gradle/jdks/17/macos/x86-64/local-path b/gradle/jdks/17/macos/x86-64/local-path new file mode 100644 index 0000000..b55ee1d --- /dev/null +++ b/gradle/jdks/17/macos/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-17.0.12.7.1 diff --git a/gradle/jdks/17/windows/x86-64/download-url b/gradle/jdks/17/windows/x86-64/download-url new file mode 100644 index 0000000..8f22f95 --- /dev/null +++ b/gradle/jdks/17/windows/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/17.0.12.7.1/amazon-corretto-17.0.12.7.1-windows-x64-jdk.zip diff --git a/gradle/jdks/17/windows/x86-64/local-path b/gradle/jdks/17/windows/x86-64/local-path new file mode 100644 index 0000000..b55ee1d --- /dev/null +++ b/gradle/jdks/17/windows/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-17.0.12.7.1 diff --git a/gradle/jdks/21/linux-glibc/aarch64/download-url b/gradle/jdks/21/linux-glibc/aarch64/download-url new file mode 100644 index 0000000..ab51f6d --- /dev/null +++ b/gradle/jdks/21/linux-glibc/aarch64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/21.0.4.7.1/amazon-corretto-21.0.4.7.1-linux-aarch64.tar.gz diff --git a/gradle/jdks/21/linux-glibc/aarch64/local-path b/gradle/jdks/21/linux-glibc/aarch64/local-path new file mode 100644 index 0000000..7865953 --- /dev/null +++ b/gradle/jdks/21/linux-glibc/aarch64/local-path @@ -0,0 +1 @@ +amazon-corretto-21.0.4.7.1 diff --git a/gradle/jdks/21/linux-glibc/x86-64/download-url b/gradle/jdks/21/linux-glibc/x86-64/download-url new file mode 100644 index 0000000..214ea71 --- /dev/null +++ b/gradle/jdks/21/linux-glibc/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/21.0.4.7.1/amazon-corretto-21.0.4.7.1-linux-x64.tar.gz diff --git a/gradle/jdks/21/linux-glibc/x86-64/local-path b/gradle/jdks/21/linux-glibc/x86-64/local-path new file mode 100644 index 0000000..7865953 --- /dev/null +++ b/gradle/jdks/21/linux-glibc/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-21.0.4.7.1 diff --git a/gradle/jdks/21/linux-musl/aarch64/download-url b/gradle/jdks/21/linux-musl/aarch64/download-url new file mode 100644 index 0000000..0eb5091 --- /dev/null +++ b/gradle/jdks/21/linux-musl/aarch64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/21.0.4.7.1/amazon-corretto-21.0.4.7.1-alpine-linux-aarch64.tar.gz diff --git a/gradle/jdks/21/linux-musl/aarch64/local-path b/gradle/jdks/21/linux-musl/aarch64/local-path new file mode 100644 index 0000000..7865953 --- /dev/null +++ b/gradle/jdks/21/linux-musl/aarch64/local-path @@ -0,0 +1 @@ +amazon-corretto-21.0.4.7.1 diff --git a/gradle/jdks/21/linux-musl/x86-64/download-url b/gradle/jdks/21/linux-musl/x86-64/download-url new file mode 100644 index 0000000..421fdc3 --- /dev/null +++ b/gradle/jdks/21/linux-musl/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/21.0.4.7.1/amazon-corretto-21.0.4.7.1-alpine-linux-x64.tar.gz diff --git a/gradle/jdks/21/linux-musl/x86-64/local-path b/gradle/jdks/21/linux-musl/x86-64/local-path new file mode 100644 index 0000000..7865953 --- /dev/null +++ b/gradle/jdks/21/linux-musl/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-21.0.4.7.1 diff --git a/gradle/jdks/21/macos/aarch64/download-url b/gradle/jdks/21/macos/aarch64/download-url new file mode 100644 index 0000000..03a669f --- /dev/null +++ b/gradle/jdks/21/macos/aarch64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/21.0.4.7.1/amazon-corretto-21.0.4.7.1-macosx-aarch64.tar.gz diff --git a/gradle/jdks/21/macos/aarch64/local-path b/gradle/jdks/21/macos/aarch64/local-path new file mode 100644 index 0000000..7865953 --- /dev/null +++ b/gradle/jdks/21/macos/aarch64/local-path @@ -0,0 +1 @@ +amazon-corretto-21.0.4.7.1 diff --git a/gradle/jdks/21/macos/x86-64/download-url b/gradle/jdks/21/macos/x86-64/download-url new file mode 100644 index 0000000..4c3d36c --- /dev/null +++ b/gradle/jdks/21/macos/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/21.0.4.7.1/amazon-corretto-21.0.4.7.1-macosx-x64.tar.gz diff --git a/gradle/jdks/21/macos/x86-64/local-path b/gradle/jdks/21/macos/x86-64/local-path new file mode 100644 index 0000000..7865953 --- /dev/null +++ b/gradle/jdks/21/macos/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-21.0.4.7.1 diff --git a/gradle/jdks/21/windows/x86-64/download-url b/gradle/jdks/21/windows/x86-64/download-url new file mode 100644 index 0000000..3d3b6cf --- /dev/null +++ b/gradle/jdks/21/windows/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/21.0.4.7.1/amazon-corretto-21.0.4.7.1-windows-x64-jdk.zip diff --git a/gradle/jdks/21/windows/x86-64/local-path b/gradle/jdks/21/windows/x86-64/local-path new file mode 100644 index 0000000..7865953 --- /dev/null +++ b/gradle/jdks/21/windows/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-21.0.4.7.1 diff --git a/gradlew b/gradlew index b740cf1..6938ca3 100755 --- a/gradlew +++ b/gradlew @@ -61,6 +61,15 @@ # You can find Gradle at https://github.com/gradle/gradle/. # ############################################################################## +# >>> Gradle JDK setup >>> +# !! Contents within this block are managed by 'palantir/gradle-jdks' !! +if [ -f gradle/gradle-jdks-setup.sh ]; then + if ! . gradle/gradle-jdks-setup.sh; then + echo "Failed to set up JDK, running gradle/gradle-jdks-setup.sh failed with non-zero exit code" + exit 1 + fi +fi +# <<< Gradle JDK setup <<< # Attempt to set APP_HOME @@ -246,4 +255,4 @@ eval "set -- $( tr '\n' ' ' )" '"$@"' -exec "$JAVACMD" "$@" +exec "$JAVACMD" "$@" \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 688b6c1..b5929de 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,13 @@ +buildscript { + repositories { + mavenCentral() { metadataSources { mavenPom(); ignoreGradleMetadataRedirection() } } + gradlePluginPortal() { metadataSources { mavenPom(); ignoreGradleMetadataRedirection() } } + } + dependencies { + classpath 'com.palantir.gradle.jdks:gradle-jdks-settings:0.46.0' + } +} +apply plugin: 'com.palantir.jdks.settings' rootProject.name = 'refreshable-root' include 'refreshable'