@@ -31,10 +31,23 @@ DEST_PATH=$(mktemp -d)
3131
3232if [ -z " $NDK_PLATFORM " ]; then
3333 export NDK_PLATFORM=" android-21"
34- echo " Compiling for default platform: [${NDK_PLATFORM} ] - That can be changed by setting an NDK_PLATFORM environment variable."
34+ echo " Compiling for default platform: [${NDK_PLATFORM} ]"
35+ echo " That can be changed by setting an NDK_PLATFORM environment variable."
3536fi
3637
3738SDK_VERSION=$( echo " $NDK_PLATFORM " | cut -f2 -d" -" )
39+ if [ -z " $NDK_VERSION " ]; then
40+ echo " Failed to determine the NDK version."
41+ exit 1
42+ fi
43+ if [ -z " $SDK_VERSION " ]; then
44+ echo " Failed to determine the SDK version."
45+ exit 1
46+ fi
47+ echo " NDK version: [$NDK_VERSION ]"
48+ echo " SDK version: [$SDK_VERSION ]"
49+
50+ echo
3851
3952if which zip > /dev/null; then
4053 echo " The 'zip' command is installed."
@@ -140,7 +153,9 @@ zip -9 -r "$AAR_PATH" META-INF prefab AndroidManifest.xml
140153cd .. || exit
141154rm -r " $DEST_PATH "
142155
143- echo " Congrats you have built an AAR containing libsodium!
156+ echo "
157+
158+ Congrats you have built an AAR containing libsodium!
144159The build used a min Android SDK of version $SDK_VERSION
145160You can build for a different SDK version by specifying NDK_PLATFORM=\" android-{SDK_VERSION}\"
146161as an environment variable before running this script but the defaults should be fine.
@@ -174,4 +189,6 @@ gradle or cmake (as set by default for Android Studio projects):
174189 - 'sodium' for the full shared library,
175190 - 'sodium-static' for the full static library
176191 - 'sodium-minimal' for the minimal shared library, or
177- - 'sodium-minimal-static' for the minimal static library."
192+ - 'sodium-minimal-static' for the minimal static library.
193+
194+ "
0 commit comments