Gradle 6.9, Android Gradle Plugin 4.2.1 (#31593)

Summary:
Bump Gradle to 6.9 which supports Apple Silicon, also Android Gradle Plugin 4.2.1 which defaults to Java 1.8 so no additional config required.

## Changelog

[Android] [Changed] - Bump Gradle to 6.9, Android Gradle Plugin to 4.2.1

Pull Request resolved: https://github.com/facebook/react-native/pull/31593

Test Plan: rn-tester builds and runs as expected

Reviewed By: mdvacca

Differential Revision: D28711942

Pulled By: ShikaSD

fbshipit-source-id: 2a4616cd0f17db7616ab29dea1652717f2cd0f6d
This commit is contained in:
Dulmandakh 2021-06-01 11:26:16 -07:00 committed by Facebook GitHub Bot
parent 74d5d03dbd
commit 547b4c92e4
14 changed files with 14 additions and 25 deletions

View File

@ -428,10 +428,6 @@ task extractJNIFiles {
android {
compileSdkVersion 30
ndkVersion ANDROID_NDK_VERSION
compileOptions {
sourceCompatibility(JavaVersion.VERSION_1_8)
targetCompatibility(JavaVersion.VERSION_1_8)
}
defaultConfig {
minSdkVersion(21)

View File

@ -17,8 +17,8 @@ buildscript {
}
}
dependencies {
classpath("com.android.tools.build:gradle:4.1.0")
classpath("de.undercouch:gradle-download-task:4.0.2")
classpath("com.android.tools.build:gradle:4.2.1")
classpath("de.undercouch:gradle-download-task:4.1.1")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files

View File

@ -5,3 +5,4 @@ org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError
org.gradle.parallel=true
ANDROID_NDK_VERSION=20.1.5948944
android.useAndroidX=true

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -19,7 +19,7 @@ buildscript {
}
}
dependencies {
classpath("com.android.tools.build:gradle:4.1.0")
classpath("com.android.tools.build:gradle:4.2.1")
}
}

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -19,7 +19,7 @@ gradlePlugin {
}
dependencies {
implementation 'com.android.tools.build:gradle:4.1.0'
implementation 'com.android.tools.build:gradle:4.2.1'
// Use the same Gson version that `com.android.tools.build:gradle` depends on.
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.google.guava:guava:29.0-jre'

View File

@ -8,7 +8,7 @@
plugins {
`java-gradle-plugin`
`kotlin-dsl`
kotlin("jvm") version "1.4.21"
kotlin("jvm") version "1.4.20"
}
repositories {
@ -26,5 +26,5 @@ gradlePlugin {
}
dependencies {
implementation("com.android.tools.build:gradle:4.1.0")
implementation("com.android.tools.build:gradle:4.2.1")
}

View File

@ -131,10 +131,7 @@ def useIntlJsc = false
android {
compileSdkVersion 29
ndkVersion ANDROID_NDK_VERSION
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
javaMaxHeapSize "4g"
}

View File

@ -125,11 +125,6 @@ android {
compileSdkVersion rootProject.ext.compileSdkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "com.helloworld"
minSdkVersion rootProject.ext.minSdkVersion

View File

@ -13,7 +13,7 @@ buildscript {
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:4.1.0")
classpath("com.android.tools.build:gradle:4.2.1")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -216,8 +216,8 @@ def rn_robolectric_test(name, srcs, vm_args = None, *args, **kwargs):
"-XX:+UseConcMarkSweepGC", # required by -XX:+CMSClassUnloadingEnabled
"-XX:+CMSClassUnloadingEnabled",
"-XX:ReservedCodeCacheSize=150M",
"-Drobolectric.dependency.dir=buck-out/gen/ReactAndroid/src/main/third-party/java/robolectric/4.4",
"-Dlibraries=buck-out/gen/ReactAndroid/src/main/third-party/java/robolectric/4.4/*.jar",
"-Drobolectric.dependency.dir=buck-out/gen/ReactAndroid/src/main/third-party/java/robolectric",
"-Dlibraries=buck-out/gen/ReactAndroid/src/main/third-party/java/robolectric/*.jar",
"-Drobolectric.logging.enabled=true",
"-XX:MaxPermSize=620m",
"-Drobolectric.offline=true",