File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717set -euo pipefail
1818
19- export XCODE_VERSION=" 14.1"
20- export DEVELOPER_DIR=" /Applications/Xcode.app/Contents/Developer"
21- export ANDROID_HOME=" /usr/local/share/android-sdk"
22- export COURSIER_OPTS=" -Djava.net.preferIPv6Addresses=true"
23-
2419if [[ -n " ${KOKORO_ROOT:- } " ]] ; then
2520 readonly TINK_BASE_DIR=" $( echo " ${KOKORO_ARTIFACTS_DIR} " /git* ) "
2621 cd " ${TINK_BASE_DIR} /tink_java_awskms"
2722 export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-8-latest/Contents/Home
23+ export XCODE_VERSION=" 14.1"
24+ export DEVELOPER_DIR=" /Applications/Xcode.app/Contents/Developer"
2825fi
2926
3027BAZEL_TEST_ARGS=()
@@ -39,5 +36,5 @@ BAZEL_TEST_ARGS+=( . )
3936
4037readonly BAZEL_TEST_ARGS
4138
42- ./kokoro/testutils/update_android_sdk.sh
39+ source ./kokoro/testutils/update_android_sdk.sh
4340./kokoro/testutils/run_bazel_tests.sh " ${BAZEL_TEST_ARGS[@]} "
Original file line number Diff line number Diff line change 1515# limitations under the License.
1616# ###############################################################################
1717
18+ # Installs the Android SDK and tools and sets the ANDROID_HOME environment
19+ # variable if running on Kokoro.
1820set -x
1921
2022if [[ -z " ${KOKORO_ROOT} " ]] ; then
2123 exit 0
2224fi
2325
26+ readonly ANDROID_COMMANDLINETOOLS_URL=" https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip"
27+ readonly ANDROID_COMMANDLINETOOLS_SHA256=" 2ccbda4302db862a28ada25aa7425d99dce9462046003c1714b059b5c47970d8"
2428readonly PLATFORM=" $( uname | tr ' [:upper:]' ' [:lower:]' ) "
2529
30+ export ANDROID_HOME=" /tmp/android-sdk"
31+
2632if [[ " ${PLATFORM} " == ' darwin' ]]; then
2733 export JAVA_OPTS=" -Djava.net.preferIPv6Addresses=true"
2834fi
2935
30- # Install build-tools and other SDK dependencies.
31- #
36+ mkdir -p " ${ANDROID_HOME} "
37+ time curl -LsS " ${ANDROID_COMMANDLINETOOLS_URL} " -o cmdline-tools.zip
38+ echo " ${ANDROID_COMMANDLINETOOLS_SHA256} cmdline-tools.zip" | sha256sum -c
39+ unzip cmdline-tools.zip -d " ${ANDROID_HOME} "
3240# Discard STDOUT due to noisy progress bar which can't be silenced.
33- (yes || true) | " ${ANDROID_HOME} /tools/bin/sdkmanager" \
41+ (yes || true) | " ${ANDROID_HOME} /cmdline-tools/bin/sdkmanager" \
42+ " --sdk_root=${ANDROID_HOME} " \
3443 " build-tools;30.0.3" \
35- " platform-tools" \
3644 " platforms;android-23" \
3745 " platforms;android-26" \
38- " platforms;android-29" \
39- " platforms;android-30" \
40- " platforms;android-31" \
4146 > /dev/null
47+ rm -rf cmdline-tools.zip
You can’t perform that action at this time.
0 commit comments