Skip to content

Commit 1d5fe77

Browse files
dulmandakhgrabbou
authored andcommitted
fix validate-android-test-env.sh (facebook#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: facebook#22961 Differential Revision: D13655750 Pulled By: hramos fbshipit-source-id: 1accb6ac7a7c74ab335dd92977b0b090820a622c
1 parent d811d38 commit 1d5fe77

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ aliases:
241241

242242
- &compile-native-libs
243243
name: Compile Native Libs for Unit and Integration Tests
244-
command: ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=$BUILD_THREADS -Pcom.android.build.threadPoolSize=1
244+
command: ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=$BUILD_THREADS
245245
no_output_timeout: 6m
246246

247247
- &run-android-unit-tests

ContainerShip/Dockerfile.android

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ ADD react.gradle /app/react.gradle
5050
RUN ./gradlew :ReactAndroid:downloadBoost :ReactAndroid:downloadDoubleConversion :ReactAndroid:downloadFolly :ReactAndroid:downloadGlog :ReactAndroid:downloadJSCHeaders
5151

5252
# compile native libs with Gradle script, we need bridge for unit and integration tests
53-
RUN ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=1 -Pcom.android.build.threadPoolSize=1
53+
RUN ./gradlew :ReactAndroid:packageReactNdkLibsForBuck -Pjobs=1
5454

5555
# add all react-native code
5656
ADD . /app

scripts/validate-android-test-env.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,6 @@ else
5252
fi
5353
fi
5454

55-
# BUILD_TOOLS_VERSION is in a format like "23.0.1"
56-
BUILD_TOOLS_VERSION=`grep buildToolsVersion $(dirname $0)/../ReactAndroid/build.gradle | sed 's/^[^"]*\"//' | sed 's/"//'`
57-
5855
# MAJOR is something like "23"
5956
MAJOR=`grep compileSdkVersion $(dirname $0)/../ReactAndroid/build.gradle | sed 's/[^[:digit:]]//g'`
6057

@@ -74,15 +71,15 @@ if [ ! -e "$PLATFORM_DIR" ]; then
7471
fi
7572

7673
# Check that we have the right version of the build tools.
77-
BT_DIR="$ANDROID_HOME/build-tools/$BUILD_TOOLS_VERSION"
74+
BT_DIR="$ANDROID_HOME/build-tools/$ANDROID_SDK_BUILD_TOOLS_REVISION"
7875
if [ ! -e "$BT_DIR" ]; then
79-
echo "Error: could not find version $BUILD_TOOLS_VERSION of the Android build tools."
76+
echo "Error: could not find version $ANDROID_SDK_BUILD_TOOLS_REVISION of the Android build tools."
8077
echo "Specifically, the directory $BT_DIR does not exist."
8178
echo "You probably need to explicitly install the correct version of the Android SDK Build Tools from within Android Studio."
8279
echo "See https://facebook.github.io/react-native/docs/getting-started.html for details."
8380
echo "If you are using Android SDK Tools from the command line, you may need to run:"
8481
echo
85-
echo " sdkmanager \"platform-tools\" \"build-tools;android-$BUILD_TOOLS_VERSION\""
82+
echo " sdkmanager \"platform-tools\" \"build-tools;android-$ANDROID_SDK_BUILD_TOOLS_REVISION\""
8683
echo
8784
echo "Check out https://developer.android.com/studio/command-line/sdkmanager.html for details."
8885
exit 1

0 commit comments

Comments
 (0)