Skip to content

Commit 8a4bb59

Browse files
committed
Improve readability
1 parent c01ba04 commit 8a4bb59

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

dist-build/android-aar.sh

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,23 @@ DEST_PATH=$(mktemp -d)
3131

3232
if [ -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."
3536
fi
3637

3738
SDK_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

3952
if 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
140153
cd .. || exit
141154
rm -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!
144159
The build used a min Android SDK of version $SDK_VERSION
145160
You can build for a different SDK version by specifying NDK_PLATFORM=\"android-{SDK_VERSION}\"
146161
as 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

Comments
 (0)