Fix NDK build, Take II

Summary:
There was one incorrect path and some caching problems. I hope this will take
care of it for good.

Reviewed By: emilsjolander

Differential Revision: D5470120

fbshipit-source-id: 17c9e783c952c92fa5c2ccfb18107a59d8a80e3d
This commit is contained in:
Pascal Hartig
2017-07-21 08:26:56 -07:00
committed by Facebook Github Bot
parent 7ea50439ce
commit c9384762ee
2 changed files with 10 additions and 10 deletions

View File

@@ -76,7 +76,7 @@ before_install:
source scripts/android-setup.sh && installAndroidSDK
export ANDROID_SDK=$ANDROID_HOME
export ANDROID_NDK_REPOSITORY=$HOME/android-ndk
export ANDROID_NDK_HOME=$ANDROID_NDK_REPOSITORY/android-ndk-13b
export ANDROID_NDK_HOME=$ANDROID_NDK_REPOSITORY/android-ndk-r13b
fi
# JavaScript

View File

@@ -17,7 +17,7 @@ function installsdk() {
PROXY_ARGS="--proxy=http --proxy_host=$PROXY_HOST --proxy_port=$PROXY_PORT"
fi
yes | $ANDROID_HOME/tools/bin/sdkmanager $PROXY_ARGS $@
yes | "$ANDROID_HOME/tools/bin/sdkmanager" $PROXY_ARGS $@
}
function installAndroidSDK {
@@ -25,24 +25,24 @@ function installAndroidSDK {
export ANDROID_NDK_REPOSITORY=$HOME/android-ndk
export PATH="$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$PATH"
if [[ ! -d "$ANDROID_HOME" ]]; then
if [[ ! -f "$ANDROID_HOME/tools/bin/sdkmanager" ]]; then
TMP=/tmp/sdk$$.zip
download 'https://dl.google.com/android/repository/sdk-tools-darwin-3859397.zip' $TMP
unzip -qod $ANDROID_HOME $TMP
unzip -qod "$ANDROID_HOME" "$TMP"
rm $TMP
fi
if [[ ! -d "$ANDROID_NDK_REPOSITORY" ]]; then
if [[ ! -d "$ANDROID_NDK_REPOSITORY/android-ndk-r13b" ]]; then
TMP=/tmp/ndk$$.zip
mkdir -p $ANDROID_NDK_REPOSITORY
mkdir -p "$ANDROID_NDK_REPOSITORY"
download 'https://dl.google.com/android/repository/android-ndk-r13b-darwin-x86_64.zip' $TMP
unzip -qod $ANDROID_NDK_REPOSITORY $TMP
unzip -qod "$ANDROID_NDK_REPOSITORY" "$TMP"
rm $TMP
fi
mkdir -p $ANDROID_HOME/licenses/
echo > $ANDROID_HOME/licenses/android-sdk-license
echo -n 8933bad161af4178b1185d1a37fbf41ea5269c55 >> $ANDROID_HOME/licenses/android-sdk-license
mkdir -p "$ANDROID_HOME/licenses/"
echo > "$ANDROID_HOME/licenses/android-sdk-license"
echo -n 8933bad161af4178b1185d1a37fbf41ea5269c55 >> "$ANDROID_HOME/licenses/android-sdk-license"
installsdk 'build-tools;23.0.2' 'build-tools;25.0.2' 'build-tools;25.0.1' 'platform-tools' 'platforms;android-23' 'platforms;android-25' 'extras;android;m2repository'
}