Skip to content

Commit

Permalink
Set the default Android platform to 21
Browse files Browse the repository at this point in the history
Also explain that the "zip" command is required to build AAR archives
and that NDK_PLATFORM can be used to override the target platform.

Fixes #1440
  • Loading branch information
jedisct1 committed Jan 16, 2025
1 parent 6125c37 commit 151e71b
Show file tree
Hide file tree
Showing 2 changed files with 9 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 @@ -9,6 +9,13 @@ SODIUM_VERSION="1.0.20.0"
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)

if which zip >/dev/null; then
echo "The 'zip' command is installed."
else
echo "The 'zip' command is not installed. Please install it before running this script."
exit 1
fi

cd "$(dirname "$0")/../" || exit

make_abi_json() {
Expand Down
3 changes: 2 additions & 1 deletion dist-build/android-build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#! /bin/sh

if [ -z "$NDK_PLATFORM" ]; then
export NDK_PLATFORM="android-19"
export NDK_PLATFORM="android-21"
echo "Compiling for default platform: [${NDK_PLATFORM}] - That can be changed by setting an NDK_PLATFORM environment variable."
fi
export NDK_PLATFORM_COMPAT="${NDK_PLATFORM_COMPAT:-${NDK_PLATFORM}}"
export NDK_API_VERSION="$(echo "$NDK_PLATFORM" | sed 's/^android-//')"
Expand Down

0 comments on commit 151e71b

Please sign in to comment.