[Android] compile.sh: use android.ndkPath to specify the NDK path
Steve Lhomme
git at videolan.org
Mon Dec 16 13:46:29 UTC 2024
vlc-android | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Oct 9 08:25:40 2024 +0200| [a1ca5b1d5e265181411728c417cc05158f55b3d2] | committer: Duncan McNamara
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
> https://code.videolan.org/videolan/vlc-android/commit/a1ca5b1d5e265181411728c417cc05158f55b3d2
---
buildsystem/compile.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/buildsystem/compile.sh b/buildsystem/compile.sh
index 802827ac45..c13bb90bac 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 $?; }
More information about the Android
mailing list