Skip to content

Modernize android build  #1095

Closed
Closed

Description

@anod

The current android build uses an outdated Gradle, cmake and java build dependencies and requires outdated IDE Android Studio 4 to run the project

Suggested to upgrade

  1. Gradle and android Gradle plugin
  2. Compile SDK version
  3. Cmake
  4. Test project dependcies
  5. Java 17

Can we upgrade it? Is there any additional guidance?

Activity

  1. added
    bugSomething isn't working
    questionFurther information is requested
    and removed
    bugSomething isn't working
    on Feb 2, 2023
  2. lalitb commented on Feb 9, 2023

    @lalitb
    Contributor

    Alex Gavrishev (@anod) It would be good to upgrade the android build toolset we are using. I am not Java/Android expert, will this anyway change the minimum sdk version we correctly support, as I know few teams still needing support for Android 4.4 (sdk level 19) ?

  3. anod commented on Feb 9, 2023

    @anod
    MemberAuthor

    Thanks Lalit Kumar Bhasin (@lalitb) I think there is no need to update minimum version. I will test and comeback with more details.
    it might require to upgrade cmake, is there limitation for cmake version capabilities.

  4. lalitb commented on Feb 9, 2023

    @lalitb
    Contributor

    it might require to upgrade cmake, is there limitation for cmake version capabilities.

    Which cmake version to upgrade to ? Ideally it would be good to support 3.1.0 as minimum version, and conditionally include any feature required from higher version:

    cmake_minimum_required(VERSION 3.1.0)
    if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12")
      ...
    endif()
    
  5. maxgolov commented on Feb 16, 2023

    @maxgolov
    Contributor

    Can I ask so that when we implement this, we can specify what versions of Android deps to use via env vars. My team needs this layer to be compatible with certain versions of NDK and SDK.. I wonder if we can use something like this:

    export SDKAPILevelOverride=android-28
    export NDKAPILevelOverride=latest
    

    or what not. Similar how it's handled in Unreal Engine. It's a moving target for us.

  6. anod commented on Feb 24, 2023

    @anod
    MemberAuthor

    For SDK level there is an option to overlay default config with custom tools.gradle.user file
    I think app which depends on the lib upgrades a library defined target sdk, lowering target sdk can cause unpredictable behavior

    Regarding NDK, There is a default NDK mapping between Gradle plugin and NDK
    NDK version can be overridden via ANDROID_NDK_VERSION env variable

    Regarding cmake, current version is 3.10, but there is a warning

    CMake Warning at /Users/algavris/Library/Android/sdk/ndk/23.1.7779620/build/cmake/android-legacy.toolchain.cmake:416 (message):
      An old version of CMake is being used that cannot automatically detect
      compiler attributes.  Compiler identification is being bypassed.  Some
      values may be wrong or missing.  Update to CMake 3.19 or newer to use
      CMake's built-in compiler identification.
    
  7. self-assigned this
    on Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions