buildscripts: OS X env should be in macos.sh

unix.sh is shared by multiple OSes and environments. Clear JAVA_HOME,
since we never want to use that as PATH is more reliable, better
supported, and more typical.
This commit is contained in:
Eric Anderson 2024-07-11 13:29:33 -07:00
parent 5de65a6d50
commit 15cd2f9443
2 changed files with 3 additions and 5 deletions

View File

@ -15,4 +15,7 @@ export GRADLE_FLAGS="${GRADLE_FLAGS:-} --max-workers=2"
. "$GRPC_JAVA_DIR"/buildscripts/kokoro/kokoro.sh
trap spongify_logs EXIT
export -n JAVA_HOME
export PATH="$(/usr/libexec/java_home -v"1.8.0")/bin:${PATH}"
"$GRPC_JAVA_DIR"/buildscripts/kokoro/unix.sh

View File

@ -23,11 +23,6 @@ readonly GRPC_JAVA_DIR="$(cd "$(dirname "$0")"/../.. && pwd)"
# cd to the root dir of grpc-java
cd $(dirname $0)/../..
# TODO(zpencer): always make sure we are using Oracle jdk8
if [[ -f /usr/libexec/java_home ]]; then
JAVA_HOME=$(/usr/libexec/java_home -v"1.8.0")
fi
# ARCH is x86_64 unless otherwise specified.
ARCH="${ARCH:-x86_64}"