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:
committed by
Facebook Github Bot
parent
7ea50439ce
commit
c9384762ee
@@ -76,7 +76,7 @@ before_install:
|
|||||||
source scripts/android-setup.sh && installAndroidSDK
|
source scripts/android-setup.sh && installAndroidSDK
|
||||||
export ANDROID_SDK=$ANDROID_HOME
|
export ANDROID_SDK=$ANDROID_HOME
|
||||||
export ANDROID_NDK_REPOSITORY=$HOME/android-ndk
|
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
|
fi
|
||||||
|
|
||||||
# JavaScript
|
# JavaScript
|
||||||
|
@@ -17,7 +17,7 @@ function installsdk() {
|
|||||||
PROXY_ARGS="--proxy=http --proxy_host=$PROXY_HOST --proxy_port=$PROXY_PORT"
|
PROXY_ARGS="--proxy=http --proxy_host=$PROXY_HOST --proxy_port=$PROXY_PORT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
yes | $ANDROID_HOME/tools/bin/sdkmanager $PROXY_ARGS $@
|
yes | "$ANDROID_HOME/tools/bin/sdkmanager" $PROXY_ARGS $@
|
||||||
}
|
}
|
||||||
|
|
||||||
function installAndroidSDK {
|
function installAndroidSDK {
|
||||||
@@ -25,24 +25,24 @@ function installAndroidSDK {
|
|||||||
export ANDROID_NDK_REPOSITORY=$HOME/android-ndk
|
export ANDROID_NDK_REPOSITORY=$HOME/android-ndk
|
||||||
export PATH="$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$PATH"
|
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
|
TMP=/tmp/sdk$$.zip
|
||||||
download 'https://dl.google.com/android/repository/sdk-tools-darwin-3859397.zip' $TMP
|
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
|
rm $TMP
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -d "$ANDROID_NDK_REPOSITORY" ]]; then
|
if [[ ! -d "$ANDROID_NDK_REPOSITORY/android-ndk-r13b" ]]; then
|
||||||
TMP=/tmp/ndk$$.zip
|
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
|
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
|
rm $TMP
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir -p $ANDROID_HOME/licenses/
|
mkdir -p "$ANDROID_HOME/licenses/"
|
||||||
echo > $ANDROID_HOME/licenses/android-sdk-license
|
echo > "$ANDROID_HOME/licenses/android-sdk-license"
|
||||||
echo -n 8933bad161af4178b1185d1a37fbf41ea5269c55 >> $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'
|
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'
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user