From 6cf54ff296eb79b31be3f061499b907100e18c5f Mon Sep 17 00:00:00 2001 From: Guoyu Wang <62914304+gwang-msft@users.noreply.github.com> Date: Wed, 3 Feb 2021 17:49:23 -0800 Subject: [PATCH] Switch Android CI java build to JDK 11 (#6552) * switch to jdk11 * fix java * Update --- ...ndroid-x86_64-crosscompile-ci-pipeline.yml | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/tools/ci_build/github/azure-pipelines/android-x86_64-crosscompile-ci-pipeline.yml b/tools/ci_build/github/azure-pipelines/android-x86_64-crosscompile-ci-pipeline.yml index d72f7d7aef..902e1f2bda 100644 --- a/tools/ci_build/github/azure-pipelines/android-x86_64-crosscompile-ci-pipeline.yml +++ b/tools/ci_build/github/azure-pipelines/android-x86_64-crosscompile-ci-pipeline.yml @@ -23,7 +23,26 @@ jobs: --emulator-pid-file $(Build.BinariesDirectory)/emulator.pid displayName: Start Android emulator - - script: python3 tools/ci_build/build.py --android --build_dir build --android_sdk_path $ANDROID_HOME --android_ndk_path $ANDROID_HOME/ndk-bundle --android_abi=x86_64 --android_api=29 --skip_submodule_sync --parallel --cmake_generator=Ninja --build_java + # Start switching to jdk 11 after the Android Emulator is started since Android SDK manager requires java 8 + - task: JavaToolInstaller@0 + displayName: Use jdk 11 + inputs: + versionSpec: '11' + jdkArchitectureOption: 'x64' + jdkSourceOption: 'PreInstalled' + + - script: | + python3 tools/ci_build/build.py \ + --android \ + --build_dir build \ + --android_sdk_path $ANDROID_HOME \ + --android_ndk_path $ANDROID_HOME/ndk-bundle \ + --android_abi=x86_64 \ + --android_api=29 \ + --skip_submodule_sync \ + --parallel \ + --cmake_generator=Ninja \ + --build_java displayName: CPU EP, Build and Test on Android Emulator - script: /bin/bash tools/ci_build/github/android/run_nnapi_code_coverage.sh $(pwd)