From be6725c9817477bc3a16d4f7eaa7ad831c58f816 Mon Sep 17 00:00:00 2001 From: Andriy Redko Date: Wed, 1 Nov 2023 17:01:00 -0400 Subject: [PATCH] Explicitly set JAVA_HOME to JDK-11 for Gradle build Signed-off-by: Andriy Redko --- .github/workflows/check.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 694905f..2e4f5b9 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -27,12 +27,12 @@ jobs: run: | # https://github.com/opensearch-project/opensearch-build/issues/4191 chown -R opensearch:opensearch `pwd` - su opensearch -c "source /etc/profile.d/java_home.sh && ./gradlew check -Druntime.java=${{ matrix.java }}" + su opensearch -c "source /etc/profile.d/java_home.sh && ./gradlew check -Druntime.java=${{ matrix.java }} -Dorg.gradle.java.home=${JAVA11_HOME}" - name: Run Gradle (assemble) run: | # https://github.com/opensearch-project/opensearch-build/issues/4191 chown -R opensearch:opensearch `pwd` - su opensearch -c "source /etc/profile.d/java_home.sh && ./gradlew assemble -Druntime.java=${{ matrix.java }}" + su opensearch -c "source /etc/profile.d/java_home.sh && ./gradlew assemble -Druntime.java=${{ matrix.java }} -Dorg.gradle.java.home=${JAVA11_HOME}" precommit-windows-macos: if: github.repository == 'opensearch-project/custom-codecs'