Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise Android SDK and NDK versions #105

Open
gavv opened this issue May 13, 2023 · 0 comments
Open

Revise Android SDK and NDK versions #105

gavv opened this issue May 13, 2023 · 0 comments
Labels
android Android-related tasks build system Build scripts continuous integration Continuous integration good first issue Good for newcomers help wanted Contributions are welcome

Comments

@gavv
Copy link
Member

gavv commented May 13, 2023

There are a few android-related versions that we specify in build scripts and CI:

  • Android NDK version. Does not affect runtime requirements. Generally should be set to latest available version because newer versions have more bug-fixes and optimizations.

  • Android build-tools version and CMake version. Similarly, should be set to latest available version.

  • Android API levels:

    • minSdkVersion. Defines runtime requirement of the app. The app will support only systems with this version and later. Should be set to the lowest possible version.

    • targetSdkVersion. Affects runtime behavior of the app. Should be set to the latest API level on which the app was tested. Android runtime will take this into account and will avoid behavior that was introduced in later versions.

    • compileSdkVersion. Defines compile-time version of Android SDK. Generally should be set to latest available version.

More info: 1, 2.


Currently, minSdkVersion is defined in android/roc-android/build.gradle, and other versions are defined in .github/workflows/build.yml and passed to gradle via environment variables.

What we need to do:

  • in scripts/android_docker.sh:

    • rename API to SDK_LEVEL (corresponds to compileSdkVersion)

      the rename should be also reflected in:

      • scripts/android/build_roc.sh
      • scripts/android/start_emulator.sh
      • README.md
  • in .github/workflows/build.yml:

    • in all jobs:

      • rename API to SDK_LEVEL
    • in android-linux and release jobs:

      • explicitly define BUILD_TOOLS_VERSION and CMAKE_VERSION vars (currently they're missing and we rely on defaults)
    • in android-linux, android-osx, and release jobs:

      • bump SDK_LEVEL (compileSdkVersion) to the latest available version
      • bump NDK_VERSION (Android NDK version) to the latest available version
      • bump BUILD_TOOLS_VERSION (Android build-tools version) to the latest available version
      • bump CMAKE_VERSION to the latest available version
    • in android-linux and android-osx jobs:

      • in addition to bumping versions as described above, keep one step with the currently used, older, versions of sdk, ndk, build-tools, and cmake; it will allow us to keep testing compatibility with older build environments

        in android-linux we'll need to add a new step for older versions; in android-osx we'll need to use the existing last step for that

    • in android-linux job:

      • introduce new step that runs scripts/android_docker.sh build without exporting any environment variables (SDK_LEVEL, NDK_VERSION, etc); this step will allow us to keep testing that defaults defined in android_docker.sh are good and the script works when no configuration is provided
  • In android/roc-android/build.gradle:

    • rename API env var to SDK_LEVEL
    • rename apiLevel var to sdkLevel
    • set compileSdkVersion and targetSdkVersion to sdkLevel (obtained from SDK_LEVEL)
@gavv gavv added good first issue Good for newcomers help wanted Contributions are welcome continuous integration Continuous integration labels May 13, 2023
@gavv gavv changed the title Update android version on CI Update Android API and NDK versions on CI May 13, 2023
@gavv gavv changed the title Update Android API and NDK versions on CI Revise Android API and NDK versions May 13, 2023
@gavv gavv added enhancement New feature or request and removed continuous integration Continuous integration labels May 13, 2023
@gavv gavv added the continuous integration Continuous integration label May 13, 2023
@gavv gavv changed the title Revise Android API and NDK versions Revise Android SDK and NDK versions May 13, 2023
@gavv gavv added android Android-related tasks build system Build scripts and removed enhancement New feature or request labels May 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Android-related tasks build system Build scripts continuous integration Continuous integration good first issue Good for newcomers help wanted Contributions are welcome
Projects
None yet
Development

No branches or pull requests

1 participant