Check for ANDROID_NDK definition in android-aar.sh

Otherwise, the script can report success even though nothing compiles.
This commit is contained in:
Frank Denis
2025-02-20 15:03:06 +01:00
parent 8ee7c45005
commit 97616c3ace
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -5,6 +5,13 @@
# To simplify linking, library variants have distinct names: sodium, sodium-static, sodium-minimal and sodium-minimal-static.
SODIUM_VERSION="1.0.21.0"
if [ -z "$ANDROID_NDK_HOME" ]; then
echo "You should probably set ANDROID_NDK_HOME to the directory containing"
echo "the Android NDK."
exit 1
fi
NDK_VERSION=$(grep "Pkg.Revision = " <"${ANDROID_NDK_HOME}/source.properties" | cut -f 2 -d '=' | cut -f 2 -d' ' | cut -f 1 -d'.')
DEST_PATH=$(mktemp -d)
+1 -1
View File
@@ -11,7 +11,7 @@ export NDK_API_VERSION_COMPAT="$(echo "$NDK_PLATFORM_COMPAT" | sed 's/^android-/
if [ -z "$ANDROID_NDK_HOME" ]; then
echo "You should probably set ANDROID_NDK_HOME to the directory containing"
echo "the Android NDK"
echo "the Android NDK."
exit 1
fi