fix validate-android-test-env.sh (#22961)

Summary:
fix validate-android-test-env.sh to not parse .gradle files for build tools versions, because it was removed.

Changelog:
----------
[CI] [Changed] - fix validate-android-test-env.sh to not try parse .gradle files
Pull Request resolved: https://github.com/facebook/react-native/pull/22961

Differential Revision: D13655750

Pulled By: hramos

fbshipit-source-id: 1accb6ac7a7c74ab335dd92977b0b090820a622c
This commit is contained in:
Dulmandakh 2019-01-14 10:47:14 -08:00 коммит произвёл Facebook Github Bot
Родитель 73434e6cba
Коммит 8a8a11b77a
3 изменённых файлов: 5 добавлений и 8 удалений

Просмотреть файл

@ -248,7 +248,7 @@ aliases:
- &compile-native-libs
name: Compile Native Libs for Unit and Integration Tests
command: ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=$BUILD_THREADS -Pcom.android.build.threadPoolSize=1
command: ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=$BUILD_THREADS
no_output_timeout: 6m
- &run-android-unit-tests

Просмотреть файл

@ -50,7 +50,7 @@ ADD react.gradle /app/react.gradle
RUN ./gradlew :ReactAndroid:downloadBoost :ReactAndroid:downloadDoubleConversion :ReactAndroid:downloadFolly :ReactAndroid:downloadGlog :ReactAndroid:downloadJSC
# compile native libs with Gradle script, we need bridge for unit and integration tests
RUN ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=1 -Pcom.android.build.threadPoolSize=1
RUN ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=1
# add all react-native code
ADD . /app

Просмотреть файл

@ -52,9 +52,6 @@ else
fi
fi
# BUILD_TOOLS_VERSION is in a format like "23.0.1"
BUILD_TOOLS_VERSION=`grep buildToolsVersion $(dirname $0)/../ReactAndroid/build.gradle | sed 's/^[^"]*\"//' | sed 's/"//'`
# MAJOR is something like "23"
MAJOR=`grep compileSdkVersion $(dirname $0)/../ReactAndroid/build.gradle | sed 's/[^[:digit:]]//g'`
@ -74,15 +71,15 @@ if [ ! -e "$PLATFORM_DIR" ]; then
fi
# Check that we have the right version of the build tools.
BT_DIR="$ANDROID_HOME/build-tools/$BUILD_TOOLS_VERSION"
BT_DIR="$ANDROID_HOME/build-tools/$ANDROID_SDK_BUILD_TOOLS_REVISION"
if [ ! -e "$BT_DIR" ]; then
echo "Error: could not find version $BUILD_TOOLS_VERSION of the Android build tools."
echo "Error: could not find version $ANDROID_SDK_BUILD_TOOLS_REVISION of the Android build tools."
echo "Specifically, the directory $BT_DIR does not exist."
echo "You probably need to explicitly install the correct version of the Android SDK Build Tools from within Android Studio."
echo "See https://facebook.github.io/react-native/docs/getting-started.html for details."
echo "If you are using Android SDK Tools from the command line, you may need to run:"
echo
echo " sdkmanager \"platform-tools\" \"build-tools;android-$BUILD_TOOLS_VERSION\""
echo " sdkmanager \"platform-tools\" \"build-tools;android-$ANDROID_SDK_BUILD_TOOLS_REVISION\""
echo
echo "Check out https://developer.android.com/studio/command-line/sdkmanager.html for details."
exit 1