Skip to content

Commit

Permalink
Check for ANDROID_NDK definition in android-aar.sh
Browse files Browse the repository at this point in the history
Otherwise, the script can report success even though nothing compiles.
  • Loading branch information
jedisct1 committed Feb 20, 2025
1 parent 8adeb1f commit 4cb0fb5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions dist-build/android-aar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.20.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)

Expand Down
2 changes: 1 addition & 1 deletion dist-build/android-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 4cb0fb5

Please sign in to comment.