From a1ca5b1d5e265181411728c417cc05158f55b3d2 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Wed, 9 Oct 2024 08:25:40 +0200 Subject: [PATCH] compile.sh: use android.ndkPath to specify the NDK path ndk.dir is deprecated since 4.1 [1]. We don't specify the NDK version as it should pick the default one from the NDK path. [1] https://github.com/android/ndk-samples/wiki/Configure-NDK-Path --- buildsystem/compile.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/buildsystem/compile.sh b/buildsystem/compile.sh index 802827ac4..c13bb90ba 100755 --- a/buildsystem/compile.sh +++ b/buildsystem/compile.sh @@ -193,7 +193,7 @@ init_local_props() { # or fix it if it was modified (by Android Studio, for example). echo_props() { echo "sdk.dir=$ANDROID_SDK" - echo "ndk.dir=$ANDROID_NDK" + echo "android.ndkPath=$ANDROID_NDK" } # first check if the file just needs to be created for the first time if [ ! -f "$1" ]; then @@ -231,7 +231,7 @@ init_local_props() { temp_props="$1.tmp" while IFS= read -r LINE || [ -n "$LINE" ]; do line_sdk_dir="${LINE#sdk.dir=}" - line_ndk_dir="${LINE#ndk.dir=}" + line_ndk_dir="${LINE#android.ndkPath=}" if [ "x$line_sdk_dir" = "x$LINE" -a "x$line_ndk_dir" = "x$LINE" ]; then echo "$LINE" fi @@ -239,9 +239,9 @@ init_local_props() { echo_props >> "$temp_props" mv -f -- "$temp_props" "$1" } - echo "local.properties: Contains incompatible sdk.dir and/or ndk.dir properties. Replacing..." + echo "local.properties: Contains incompatible sdk.dir and/or android.ndkPath properties. Replacing..." replace_props "$1" - echo "local.properties: Finished replacing sdk.dir and/or ndk.dir with current environment variables." + echo "local.properties: Finished replacing sdk.dir and/or android.ndkPath with current environment variables." ) } init_local_props local.properties || { echo "Error initializing local.properties"; exit $?; }