diff --git a/.gitignore b/.gitignore index 0f1f887cc..844a3b331 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,6 @@ generated_testSrc/ # Mac .DS_Store build/ + +# Gradle JDKs setup +!gradle/* diff --git a/build.gradle b/build.gradle index c0471cba4..b7a1a488e 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ buildscript { dependencies { classpath 'com.palantir.jakartapackagealignment:jakarta-package-alignment:0.6.0' - classpath 'com.palantir.gradle.jdks:gradle-jdks:0.37.0' + classpath 'com.palantir.gradle.jdks:gradle-jdks:0.57.0' classpath 'com.palantir.gradle.jdkslatest:gradle-jdks-latest:0.14.0' classpath 'com.palantir.baseline:gradle-baseline-java:5.50.0' classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:2.29.0' @@ -26,6 +26,7 @@ apply plugin: 'com.palantir.baseline' apply plugin: 'com.palantir.baseline-java-versions' apply plugin: 'com.palantir.consistent-versions' apply plugin: 'com.palantir.git-version' +apply plugin: 'com.palantir.jdks' apply plugin: 'com.palantir.jdks.latest' allprojects { @@ -56,3 +57,7 @@ javaVersions { libraryTarget = 17 runtime = 21 } + +jdks { + daemonTarget = 17 +} diff --git a/gradle.properties b/gradle.properties index 85d6c5edf..5affd3ece 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,4 @@ https.protocols="TLSv1.2" org.gradle.parallel=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 000000000..98d9bcb75 --- /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 000000000..3ed798eef --- /dev/null +++ b/gradle/gradle-jdks-functions.sh @@ -0,0 +1,173 @@ +#!/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 + +# writing to stderr +write() { echo "$*" >&2; } + +cleanup() { + [ -d "$TMP_WORK_DIR" ] && rm -rf "$TMP_WORK_DIR" +} + +die() { + write + write "$*" + write + 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 + write "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 + write "JDK installation '$jdk_installation_directory' does not exist, installing '$distribution_url' in progress ..." + elif [ ! -f "$jdk_installation_directory/bin/java" ]; then + write "Java executable not found in $jdk_installation_directory/bin/java, re-installing the JDK...." + else + continue + fi + # Download and extract the distribution into a temporary directory + 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 + write "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 + write "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 - > /dev/null || die "failed to change dir to old pwd: $OLDPWD" + + # 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" + write "Successfully installed JDK distribution in $jdk_installation_directory" + done +} diff --git a/gradle/gradle-jdks-setup.jar b/gradle/gradle-jdks-setup.jar new file mode 100644 index 000000000..17ce8d02d 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 000000000..fe7d91221 --- /dev/null +++ b/gradle/gradle-jdks-setup.sh @@ -0,0 +1,80 @@ +#!/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 +export GRADLE_DAEMON_JDK="$GRADLE_JDKS_HOME/$gradle_daemon_jdk_distribution_local_path" +set -- "-Dorg.gradle.java.home=$GRADLE_DAEMON_JDK" "$@" + +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 000000000..7b0723b19 --- /dev/null +++ b/gradle/jdks/11/linux-glibc/aarch64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/11.0.23.9.1/amazon-corretto-11.0.23.9.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 000000000..572b61684 --- /dev/null +++ b/gradle/jdks/11/linux-glibc/aarch64/local-path @@ -0,0 +1 @@ +amazon-corretto-11.0.23.9.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 000000000..85def2855 --- /dev/null +++ b/gradle/jdks/11/linux-glibc/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/11.0.23.9.1/amazon-corretto-11.0.23.9.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 000000000..572b61684 --- /dev/null +++ b/gradle/jdks/11/linux-glibc/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-11.0.23.9.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 000000000..85a73767e --- /dev/null +++ b/gradle/jdks/11/linux-glibc/x86/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/11.0.23.9.1/amazon-corretto-11.0.23.9.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 000000000..572b61684 --- /dev/null +++ b/gradle/jdks/11/linux-glibc/x86/local-path @@ -0,0 +1 @@ +amazon-corretto-11.0.23.9.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 000000000..f41195b18 --- /dev/null +++ b/gradle/jdks/11/linux-musl/aarch64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/11.0.23.9.1/amazon-corretto-11.0.23.9.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 000000000..572b61684 --- /dev/null +++ b/gradle/jdks/11/linux-musl/aarch64/local-path @@ -0,0 +1 @@ +amazon-corretto-11.0.23.9.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 000000000..7f8c4ba4f --- /dev/null +++ b/gradle/jdks/11/linux-musl/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/11.0.23.9.1/amazon-corretto-11.0.23.9.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 000000000..572b61684 --- /dev/null +++ b/gradle/jdks/11/linux-musl/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-11.0.23.9.1 diff --git a/gradle/jdks/11/macos/aarch64/download-url b/gradle/jdks/11/macos/aarch64/download-url new file mode 100644 index 000000000..aa77a6548 --- /dev/null +++ b/gradle/jdks/11/macos/aarch64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/11.0.23.9.1/amazon-corretto-11.0.23.9.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 000000000..572b61684 --- /dev/null +++ b/gradle/jdks/11/macos/aarch64/local-path @@ -0,0 +1 @@ +amazon-corretto-11.0.23.9.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 000000000..440142228 --- /dev/null +++ b/gradle/jdks/11/macos/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/11.0.23.9.1/amazon-corretto-11.0.23.9.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 000000000..572b61684 --- /dev/null +++ b/gradle/jdks/11/macos/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-11.0.23.9.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 000000000..baa0f2436 --- /dev/null +++ b/gradle/jdks/11/windows/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/11.0.23.9.1/amazon-corretto-11.0.23.9.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 000000000..572b61684 --- /dev/null +++ b/gradle/jdks/11/windows/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-11.0.23.9.1 diff --git a/gradle/jdks/11/windows/x86/download-url b/gradle/jdks/11/windows/x86/download-url new file mode 100644 index 000000000..cd428b052 --- /dev/null +++ b/gradle/jdks/11/windows/x86/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/11.0.23.9.1/amazon-corretto-11.0.23.9.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 000000000..572b61684 --- /dev/null +++ b/gradle/jdks/11/windows/x86/local-path @@ -0,0 +1 @@ +amazon-corretto-11.0.23.9.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 000000000..0e194451f --- /dev/null +++ b/gradle/jdks/17/linux-glibc/aarch64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/17.0.11.9.1/amazon-corretto-17.0.11.9.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 000000000..6a425d6db --- /dev/null +++ b/gradle/jdks/17/linux-glibc/aarch64/local-path @@ -0,0 +1 @@ +amazon-corretto-17.0.11.9.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 000000000..8074d52e0 --- /dev/null +++ b/gradle/jdks/17/linux-glibc/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/17.0.11.9.1/amazon-corretto-17.0.11.9.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 000000000..6a425d6db --- /dev/null +++ b/gradle/jdks/17/linux-glibc/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-17.0.11.9.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 000000000..6f5a98028 --- /dev/null +++ b/gradle/jdks/17/linux-musl/aarch64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/17.0.11.9.1/amazon-corretto-17.0.11.9.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 000000000..6a425d6db --- /dev/null +++ b/gradle/jdks/17/linux-musl/aarch64/local-path @@ -0,0 +1 @@ +amazon-corretto-17.0.11.9.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 000000000..2323523a7 --- /dev/null +++ b/gradle/jdks/17/linux-musl/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/17.0.11.9.1/amazon-corretto-17.0.11.9.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 000000000..6a425d6db --- /dev/null +++ b/gradle/jdks/17/linux-musl/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-17.0.11.9.1 diff --git a/gradle/jdks/17/macos/aarch64/download-url b/gradle/jdks/17/macos/aarch64/download-url new file mode 100644 index 000000000..9db318778 --- /dev/null +++ b/gradle/jdks/17/macos/aarch64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/17.0.11.9.1/amazon-corretto-17.0.11.9.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 000000000..6a425d6db --- /dev/null +++ b/gradle/jdks/17/macos/aarch64/local-path @@ -0,0 +1 @@ +amazon-corretto-17.0.11.9.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 000000000..d5194d587 --- /dev/null +++ b/gradle/jdks/17/macos/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/17.0.11.9.1/amazon-corretto-17.0.11.9.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 000000000..6a425d6db --- /dev/null +++ b/gradle/jdks/17/macos/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-17.0.11.9.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 000000000..e98309580 --- /dev/null +++ b/gradle/jdks/17/windows/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/17.0.11.9.1/amazon-corretto-17.0.11.9.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 000000000..6a425d6db --- /dev/null +++ b/gradle/jdks/17/windows/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-17.0.11.9.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 000000000..72c1eb923 --- /dev/null +++ b/gradle/jdks/21/linux-glibc/aarch64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/21.0.3.9.1/amazon-corretto-21.0.3.9.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 000000000..166147743 --- /dev/null +++ b/gradle/jdks/21/linux-glibc/aarch64/local-path @@ -0,0 +1 @@ +amazon-corretto-21.0.3.9.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 000000000..6ae2663d3 --- /dev/null +++ b/gradle/jdks/21/linux-glibc/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/21.0.3.9.1/amazon-corretto-21.0.3.9.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 000000000..166147743 --- /dev/null +++ b/gradle/jdks/21/linux-glibc/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-21.0.3.9.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 000000000..41afa2778 --- /dev/null +++ b/gradle/jdks/21/linux-musl/aarch64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/21.0.3.9.1/amazon-corretto-21.0.3.9.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 000000000..166147743 --- /dev/null +++ b/gradle/jdks/21/linux-musl/aarch64/local-path @@ -0,0 +1 @@ +amazon-corretto-21.0.3.9.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 000000000..44bf00181 --- /dev/null +++ b/gradle/jdks/21/linux-musl/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/21.0.3.9.1/amazon-corretto-21.0.3.9.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 000000000..166147743 --- /dev/null +++ b/gradle/jdks/21/linux-musl/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-21.0.3.9.1 diff --git a/gradle/jdks/21/macos/aarch64/download-url b/gradle/jdks/21/macos/aarch64/download-url new file mode 100644 index 000000000..8f0e3bbe6 --- /dev/null +++ b/gradle/jdks/21/macos/aarch64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/21.0.3.9.1/amazon-corretto-21.0.3.9.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 000000000..166147743 --- /dev/null +++ b/gradle/jdks/21/macos/aarch64/local-path @@ -0,0 +1 @@ +amazon-corretto-21.0.3.9.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 000000000..424e33edd --- /dev/null +++ b/gradle/jdks/21/macos/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/21.0.3.9.1/amazon-corretto-21.0.3.9.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 000000000..166147743 --- /dev/null +++ b/gradle/jdks/21/macos/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-21.0.3.9.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 000000000..f3e592432 --- /dev/null +++ b/gradle/jdks/21/windows/x86-64/download-url @@ -0,0 +1 @@ +https://corretto.aws/downloads/resources/21.0.3.9.1/amazon-corretto-21.0.3.9.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 000000000..166147743 --- /dev/null +++ b/gradle/jdks/21/windows/x86-64/local-path @@ -0,0 +1 @@ +amazon-corretto-21.0.3.9.1 diff --git a/gradlew b/gradlew index 1aa94a426..bda20d747 100755 --- a/gradlew +++ b/gradlew @@ -61,6 +61,17 @@ # 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" >&2 + exit 1 + fi + # Setting JAVA_HOME to the gradle daemon to make sure gradlew uses this jdk for `JAVACMD` + JAVA_HOME="$GRADLE_DAEMON_JDK" +fi +# <<< Gradle JDK setup <<< # Attempt to set APP_HOME diff --git a/settings.gradle b/settings.gradle index 6eeaec703..da53188fe 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.57.0' + } +} +apply plugin: 'com.palantir.jdks.settings' rootProject.name = 'hadoop-crypto-root' include 'crypto-core'