Skip to content

Commit f9f7da0

Browse files
[High Priority] Excavator: Update gradle-jdks infrastructure plugins (#1288)
1 parent 66cf539 commit f9f7da0

File tree

5 files changed

+17
-4
lines changed

5 files changed

+17
-4
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ buildscript {
1212
classpath 'com.palantir.gradle.externalpublish:gradle-external-publish-plugin:1.19.0'
1313
classpath 'com.palantir.gradle.failure-reports:gradle-failure-reports:1.13.0'
1414
classpath 'com.palantir.gradle.gitversion:gradle-git-version:3.2.0'
15-
classpath 'com.palantir.gradle.jdks:gradle-jdks:0.64.0'
15+
classpath 'com.palantir.gradle.jdks:gradle-jdks:0.65.0'
1616
classpath 'com.palantir.gradle.jdkslatest:gradle-jdks-latest:0.18.0'
1717
classpath 'com.palantir.gradle.plugintesting:gradle-plugin-testing:0.6.0'
1818
classpath 'com.palantir.javaformat:gradle-palantir-java-format:2.63.0'

gradle/gradle-jdks-functions.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ get_os() {
5353
case "$( uname )" in #(
5454
Linux* ) os_name="linux" ;; #(
5555
Darwin* ) os_name="macos" ;; #(
56-
* ) die "ERROR Unsupported OS: $( uname )" ;;
56+
* ) os_name="unsupported";;
5757
esac
5858

5959
if [ "$os_name" = "linux" ]; then
@@ -83,7 +83,7 @@ get_arch() {
8383
aarch64* ) arch_name="aarch64" ;; #(
8484
x86* ) arch_name="x86" ;; #(
8585
i686* ) arch_name="x86" ;; #(
86-
* ) die "ERROR Unsupported architecture: $( uname -m )" ;;
86+
* ) arch_name="unsupported";;
8787
esac
8888

8989
echo "$arch_name"
@@ -110,6 +110,13 @@ export OS
110110
ARCH=$(get_arch)
111111
export ARCH
112112

113+
is_arch_os_supported() {
114+
if [ "$OS" = "unsupported" ] || [ "$ARCH" = "unsupported" ]; then
115+
echo false
116+
fi
117+
echo true
118+
}
119+
113120
install_and_setup_jdks() {
114121
gradle_dir=$1
115122
scripts_dir=${2:-"$1"}

gradle/gradle-jdks-setup.jar

157 Bytes
Binary file not shown.

gradle/gradle-jdks-setup.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ APP_GRADLE_DIR="$APP_HOME"/gradle
6767
# Loading gradle jdk functions
6868
. "$APP_GRADLE_DIR"/gradle-jdks-functions.sh
6969

70+
if ! $(is_arch_os_supported); then
71+
echo "Skipping Gradle JDKs Setup, Unsupported OS/Arch..."
72+
cleanup
73+
return
74+
fi
75+
7076
install_and_setup_jdks "$APP_GRADLE_DIR"
7177

7278
gradle_daemon_jdk_version=$(read_value "$APP_GRADLE_DIR"/gradle-daemon-jdk-version)

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ buildscript {
44
gradlePluginPortal() { metadataSources { mavenPom(); ignoreGradleMetadataRedirection() } }
55
}
66
dependencies {
7-
classpath 'com.palantir.gradle.jdks:gradle-jdks-settings:0.64.0'
7+
classpath 'com.palantir.gradle.jdks:gradle-jdks-settings:0.65.0'
88
}
99
}
1010
apply plugin: 'com.palantir.jdks.settings'

0 commit comments

Comments
 (0)