Skip to content

Commit

Permalink
Update build-android.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
edo9300 committed Jul 18, 2024
1 parent 79de202 commit bbb7239
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions ci/build-android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,14 @@

set -euxo pipefail

if [[ "$OS_NAME" == "osx" ]]; then
ANDROID_HOME=$HOME/Library/Android/sdk
SDKMANAGER=$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager
echo y | $SDKMANAGER "ndk;21.4.7075529"
ln -sfn $ANDROID_HOME/ndk/21.4.7075529 $ANDROID_HOME/ndk-bundle
$ANDROID_HOME/ndk-bundle/ndk-build -j3
fi
if [[ "$OS_NAME" == "linux" ]]; then
ANDROID_ROOT=/usr/local/lib/android
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk-bundle
ln -sfn $ANDROID_SDK_ROOT/ndk/21.4.7075529 $ANDROID_NDK_ROOT
$ANDROID_HOME/ndk-bundle/ndk-build -j2
PROCS=""
if [[ "$TRAVIS_OS_NAME" == "macosx" ]]; then
PROCS=$(sysctl -n hw.ncpu)
else
PROCS=$(nproc)
fi

SDKMANAGER=$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager
echo y | $SDKMANAGER "ndk;21.4.7075529"
ln -sfn $ANDROID_HOME/ndk/21.4.7075529 $ANDROID_HOME/ndk-bundle
$ANDROID_HOME/ndk-bundle/ndk-build -j$PROCS

0 comments on commit bbb7239

Please sign in to comment.