Fix android CI failure after gradle updated to 7.0 (#7364)

* Fix android ci failure after gradle updated to 7.0

* minor update
This commit is contained in:
Guoyu Wang 2021-04-16 15:28:28 -07:00 committed by GitHub
parent 009f342caf
commit 96cdc65d57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 0 deletions

View file

@ -0,0 +1,19 @@
#!/bin/bash
# This script will setup gradlew to use gradle version 6.8.3 for Android CI,
# since the macOS pipeline is using gradle 7.0 which will fail the java build
# See, https://github.com/actions/virtual-environments/issues/3195
set -e
set -x
if [ $# -ne 1 ]; then
echo "One command line argument, the ORT root directory, is expected"
fi
ORT_ROOT=$1
pushd ${ORT_ROOT}/java
gradle wrapper --gradle-version 6.8.3 --no-daemon --no-watch-fs
./gradlew --version
popd

View file

@ -15,6 +15,9 @@ jobs:
- script: brew install coreutils ninja
displayName: Install coreutils and ninja
- script: /bin/bash tools/ci_build/github/android/setup_gradle_wrapper.sh $(pwd)
displayName: Setup gradle wrapper to use gradle 6.8.3
- script: |
python3 tools/python/run_android_emulator.py \
--android-sdk-root ${ANDROID_SDK_ROOT} \