mirror of
https://github.com/godotengine/godot-cpp.git
synced 2026-01-05 02:10:14 +03:00
Merge pull request #1826 from bruvzg/sync_android_vers
Sync Android SDK and NDK versions with the engine.
This commit is contained in:
2
.github/actions/setup-godot-cpp/action.yml
vendored
2
.github/actions/setup-godot-cpp/action.yml
vendored
@@ -20,7 +20,7 @@ inputs:
|
|||||||
default: 12.2.0
|
default: 12.2.0
|
||||||
description: MinGW version.
|
description: MinGW version.
|
||||||
ndk-version:
|
ndk-version:
|
||||||
default: r23c
|
default: r28b
|
||||||
description: Android NDK version.
|
description: Android NDK version.
|
||||||
buildtool:
|
buildtool:
|
||||||
default: scons
|
default: scons
|
||||||
|
|||||||
4
.github/workflows/ci-cmake.yml
vendored
4
.github/workflows/ci-cmake.yml
vendored
@@ -73,8 +73,8 @@ jobs:
|
|||||||
platform: android
|
platform: android
|
||||||
config-flags:
|
config-flags:
|
||||||
-G Ninja -DCMAKE_BUILD_TYPE=Release
|
-G Ninja -DCMAKE_BUILD_TYPE=Release
|
||||||
--toolchain ${ANDROID_HOME}/ndk/23.2.8568313/build/cmake/android.toolchain.cmake
|
--toolchain ${ANDROID_HOME}/ndk/28.1.13356709/build/cmake/android.toolchain.cmake
|
||||||
-DANDROID_PLATFORM=21 -DANDROID_ABI=arm64-v8a
|
-DANDROID_PLATFORM=24 -DANDROID_ABI=arm64-v8a
|
||||||
artifact-name: godot-cpp-android-arm64-release.cmake
|
artifact-name: godot-cpp-android-arm64-release.cmake
|
||||||
artifact-path: cmake-build/bin/libgodot-cpp.android.template_release.arm64.a
|
artifact-path: cmake-build/bin/libgodot-cpp.android.template_release.arm64.a
|
||||||
flags: arch=arm64
|
flags: arch=arm64
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ function(android_options)
|
|||||||
more information
|
more information
|
||||||
|
|
||||||
android_api_level : Target Android API level.
|
android_api_level : Target Android API level.
|
||||||
Default = 21
|
Default = 24
|
||||||
|
|
||||||
ANDROID_HOME : Path to your Android SDK installation.
|
ANDROID_HOME : Path to your Android SDK installation.
|
||||||
Default = os.environ.get("ANDROID_HOME", os.environ.get("ANDROID_SDK_ROOT")
|
Default = os.environ.get("ANDROID_HOME", os.environ.get("ANDROID_SDK_ROOT")
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ own toolchain file as listed in the cmake-toolchains_ documentation
|
|||||||
|
|
||||||
Or use the toolchain and scripts provided by the Android SDK and make changes
|
Or use the toolchain and scripts provided by the Android SDK and make changes
|
||||||
using the ``ANDROID_*`` variables listed there. Where ``<version>`` is whatever
|
using the ``ANDROID_*`` variables listed there. Where ``<version>`` is whatever
|
||||||
ndk version you have installed (tested with `23.2.8568313`) and ``<platform>``
|
ndk version you have installed (tested with `28.1.13356709`) and ``<platform>``
|
||||||
is for android sdk platform, (tested with ``android-29``)
|
is for android sdk platform, (tested with ``android-29``)
|
||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ def options(opts):
|
|||||||
opts.Add(
|
opts.Add(
|
||||||
"android_api_level",
|
"android_api_level",
|
||||||
"Target Android API level",
|
"Target Android API level",
|
||||||
"21",
|
"24",
|
||||||
)
|
)
|
||||||
opts.Add(
|
opts.Add(
|
||||||
"ndk_version",
|
"ndk_version",
|
||||||
"Fully qualified version of ndk to use for compilation.",
|
"Fully qualified version of ndk to use for compilation.",
|
||||||
"23.2.8568313",
|
"28.1.13356709",
|
||||||
)
|
)
|
||||||
opts.Add(
|
opts.Add(
|
||||||
"ANDROID_HOME",
|
"ANDROID_HOME",
|
||||||
@@ -48,9 +48,9 @@ def generate(env):
|
|||||||
my_spawn.configure(env)
|
my_spawn.configure(env)
|
||||||
|
|
||||||
# Validate API level
|
# Validate API level
|
||||||
if int(env["android_api_level"]) < 21:
|
if int(env["android_api_level"]) < 24:
|
||||||
print("WARNING: minimum supported Android target api is 21. Forcing target api 21.")
|
print("WARNING: minimum supported Android target api is 24. Forcing target api 24.")
|
||||||
env["android_api_level"] = "21"
|
env["android_api_level"] = "24"
|
||||||
|
|
||||||
# Setup toolchain
|
# Setup toolchain
|
||||||
toolchain = get_android_ndk_root(env) + "/toolchains/llvm/prebuilt/"
|
toolchain = get_android_ndk_root(env) + "/toolchains/llvm/prebuilt/"
|
||||||
|
|||||||
Reference in New Issue
Block a user