File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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'
Original file line number Diff line number Diff 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
110110ARCH=$( get_arch)
111111export ARCH
112112
113+ is_arch_os_supported () {
114+ if [ " $OS " = " unsupported" ] || [ " $ARCH " = " unsupported" ]; then
115+ echo false
116+ fi
117+ echo true
118+ }
119+
113120install_and_setup_jdks () {
114121 gradle_dir=$1
115122 scripts_dir=${2:- " $1 " }
Original file line number Diff line number Diff 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+
7076install_and_setup_jdks " $APP_GRADLE_DIR "
7177
7278gradle_daemon_jdk_version=$( read_value " $APP_GRADLE_DIR " /gradle-daemon-jdk-version)
Original file line number Diff line number Diff 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}
1010apply plugin : ' com.palantir.jdks.settings'
You can’t perform that action at this time.
0 commit comments