From 4ba0dda9b89865a6e0413009091ce43fd9ffeb23 Mon Sep 17 00:00:00 2001 From: Dulmandakh Date: Wed, 19 Sep 2018 11:38:01 -0700 Subject: [PATCH] decouple compileSdk version from build tools version (#21205) Summary: Android CI was failing due to that it was trying to extract major version from build tools and use it to compile ReactAndroid. Now, it'll extract compileSdkVersion from ReactAndroid/build.gradle and use it. Issue was that https://github.com/facebook/react-native/commit/68c7999c25efbc6fabf67e4130ac086c401b88e0 dowgraded compileSdk version to 26 while retaining build tools version as 27.0.3, so CI was trying to use SDK 27. Pull Request resolved: https://github.com/facebook/react-native/pull/21205 Differential Revision: D9943909 Pulled By: hramos fbshipit-source-id: ec9bc0c40956a16f8088532340722fd43cadde37 --- scripts/validate-android-test-env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/validate-android-test-env.sh b/scripts/validate-android-test-env.sh index 14677e91f50e97..965a191cb582fb 100755 --- a/scripts/validate-android-test-env.sh +++ b/scripts/validate-android-test-env.sh @@ -56,7 +56,7 @@ fi BUILD_TOOLS_VERSION=`grep buildToolsVersion $(dirname $0)/../ReactAndroid/build.gradle | sed 's/^[^"]*\"//' | sed 's/"//'` # MAJOR is something like "23" -MAJOR=`echo $BUILD_TOOLS_VERSION | sed 's/\..*//'` +MAJOR=`grep compileSdkVersion $(dirname $0)/../ReactAndroid/build.gradle | sed 's/[^[:digit:]]//g'` # Check that we have the right major version of the Android SDK. PLATFORM_DIR="$ANDROID_HOME/platforms/android-$MAJOR"