From 3e0ebc76632238f21c60caa92c7a2b5ee8102b71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ramos?= Date: Wed, 23 May 2018 12:43:37 -0700 Subject: [PATCH] Revert bump to API 26 and fix Android tests failures Summary: This reverts https://github.com/facebook/react-native/commit/a3931e95317acaff5ceb1d2fb0f26ae67744c8a3 The open source `test_android` job is not configured to use Android 26 quite yet. I've spent a couple of days trying to get our Android tests back in working order, with no luck. I'm reverting the change that bumped React Native to use build tools 26 + Android SDK 26. I encourage contributors interested in making this change happen to work on getting our Android tests working with API 26. This will allow us to focus on getting `test_android` back to green, and _then_ we can work on bumping to API 26 while keeping tests green. Reviewed By: fkgozali Differential Revision: D8066226 fbshipit-source-id: 9bfd58a7f081c0971b78b331073e70545c21ca6d --- .circleci/config.yml | 4 ---- RNTester/android/app/build.gradle | 6 +++--- ReactAndroid/build.gradle | 6 +++--- local-cli/templates/HelloWorld/android/app/build.gradle | 6 +++--- local-cli/templates/HelloWorld/android/build.gradle | 8 -------- scripts/.tests.env | 4 ++-- 6 files changed, 11 insertions(+), 23 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 57d57acdbf..7ede2ebf81 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -328,10 +328,8 @@ jobs: - run: *setup-artifacts - restore-cache: *restore-yarn-cache - - restore-cache: *restore-node-modules - run: *yarn - save-cache: *save-yarn-cache - - save-cache: *save-node-modules # Basic checks against the checkout, cache... - run: *run-sanity-checks @@ -459,10 +457,8 @@ jobs: - save-cache: *save-cache-gradle-downloads - restore-cache: *restore-yarn-cache - - restore-cache: *restore-node-modules - run: *yarn - save-cache: *save-yarn-cache - - save-cache: *save-node-modules - run: name: Publish React Native Package diff --git a/RNTester/android/app/build.gradle b/RNTester/android/app/build.gradle index c1149e6a5e..5e5503b5eb 100644 --- a/RNTester/android/app/build.gradle +++ b/RNTester/android/app/build.gradle @@ -84,8 +84,8 @@ def enableSeparateBuildPerCPUArchitecture = false def enableProguardInReleaseBuilds = false android { - compileSdkVersion 26 - buildToolsVersion "26.0.3" + compileSdkVersion 23 + buildToolsVersion "23.0.1" defaultConfig { applicationId "com.facebook.react.uiapp" @@ -137,7 +137,7 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:26.0.2' + compile 'com.android.support:appcompat-v7:23.0.1' // Build React Native from source compile project(':ReactAndroid') diff --git a/ReactAndroid/build.gradle b/ReactAndroid/build.gradle index 29fdcd6aae..503b814f32 100644 --- a/ReactAndroid/build.gradle +++ b/ReactAndroid/build.gradle @@ -242,8 +242,8 @@ task packageReactNdkLibsForBuck(dependsOn: packageReactNdkLibs, type: Copy) { } android { - compileSdkVersion 26 - buildToolsVersion "26.0.3" + compileSdkVersion 23 + buildToolsVersion "23.0.1" defaultConfig { minSdkVersion 16 @@ -292,7 +292,7 @@ android { dependencies { compile fileTree(dir: 'src/main/third-party/java/infer-annotations/', include: ['*.jar']) compile 'javax.inject:javax.inject:1' - compile 'com.android.support:appcompat-v7:26.0.2' + compile 'com.android.support:appcompat-v7:23.0.1' compile 'com.facebook.fbui.textlayoutbuilder:textlayoutbuilder:1.0.0' compile 'com.facebook.fresco:fresco:1.9.0' compile 'com.facebook.fresco:imagepipeline-okhttp3:1.9.0' diff --git a/local-cli/templates/HelloWorld/android/app/build.gradle b/local-cli/templates/HelloWorld/android/app/build.gradle index f9f5ebc2bb..ec6f302257 100644 --- a/local-cli/templates/HelloWorld/android/app/build.gradle +++ b/local-cli/templates/HelloWorld/android/app/build.gradle @@ -94,8 +94,8 @@ def enableSeparateBuildPerCPUArchitecture = false def enableProguardInReleaseBuilds = false android { - compileSdkVersion 26 - buildToolsVersion "26.0.3" + compileSdkVersion 23 + buildToolsVersion "23.0.1" defaultConfig { applicationId "com.helloworld" @@ -138,7 +138,7 @@ android { dependencies { compile fileTree(dir: "libs", include: ["*.jar"]) - compile "com.android.support:appcompat-v7:26.0.2" + compile "com.android.support:appcompat-v7:23.0.1" compile "com.facebook.react:react-native:+" // From node_modules } diff --git a/local-cli/templates/HelloWorld/android/build.gradle b/local-cli/templates/HelloWorld/android/build.gradle index 8bd0ba32b0..eed9972b5c 100644 --- a/local-cli/templates/HelloWorld/android/build.gradle +++ b/local-cli/templates/HelloWorld/android/build.gradle @@ -3,10 +3,6 @@ buildscript { repositories { jcenter() - maven { - url 'https://maven.google.com/' - name 'Google' - } } dependencies { classpath 'com.android.tools.build:gradle:2.2.3' @@ -20,10 +16,6 @@ allprojects { repositories { mavenLocal() jcenter() - maven { - url 'https://maven.google.com/' - name 'Google' - } maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" diff --git a/scripts/.tests.env b/scripts/.tests.env index ab318809fe..a03f487abe 100644 --- a/scripts/.tests.env +++ b/scripts/.tests.env @@ -4,9 +4,9 @@ ## ANDROID ## # Android SDK Build Tools revision -export ANDROID_SDK_BUILD_TOOLS_REVISION=26.0.3 +export ANDROID_SDK_BUILD_TOOLS_REVISION=23.0.1 # Android API Level we build with -export ANDROID_SDK_BUILD_API_LEVEL="26" +export ANDROID_SDK_BUILD_API_LEVEL="23" # Google APIs for Android level export ANDROID_GOOGLE_API_LEVEL="23" # Minimum Android API Level we target