Skip to content

Conversation

@guoyu-wang
Copy link
Contributor

@guoyu-wang guoyu-wang commented Feb 3, 2021

Description: Switch Android CI java build to JDK 11

Motivation and Context

  • This is a 1CS security requirement, "For managed code (Java), all code must be compiled with JDK11 and Android SDK platform tools revision 25.04 or later."
  • We are still targeting java 8 for compatibility, the change is only the compiler
  • This will be required for planned Android packaging work

@guoyu-wang guoyu-wang requested a review from snnn February 3, 2021 20:10
@guoyu-wang guoyu-wang requested a review from a team as a code owner February 3, 2021 20:10
- 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

task: JavaToolInstaller@0 [](start = 4, length = 25)

Will this execute once?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this task is actually setting the environment variables

@Craigacp
Copy link
Contributor

Craigacp commented Feb 3, 2021

We could switch the regular Java build to 11 too, and target the Java 8 release to ensure compatibility.

@guoyu-wang guoyu-wang merged commit 6cf54ff into master Feb 4, 2021
@guoyu-wang guoyu-wang deleted the gwang-msft/android_build_use_jdk11 branch February 4, 2021 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants