Skip to content

Commit 547b4c9

Browse files
dulmandakhfacebook-github-bot
authored andcommitted
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: #31593 Test Plan: rn-tester builds and runs as expected Reviewed By: mdvacca Differential Revision: D28711942 Pulled By: ShikaSD fbshipit-source-id: 2a4616cd0f17db7616ab29dea1652717f2cd0f6d
1 parent 74d5d03 commit 547b4c9

File tree

14 files changed

+14
-25
lines changed

14 files changed

+14
-25
lines changed

ReactAndroid/build.gradle

-4
Original file line numberDiff line numberDiff line change
@@ -428,10 +428,6 @@ task extractJNIFiles {
428428
android {
429429
compileSdkVersion 30
430430
ndkVersion ANDROID_NDK_VERSION
431-
compileOptions {
432-
sourceCompatibility(JavaVersion.VERSION_1_8)
433-
targetCompatibility(JavaVersion.VERSION_1_8)
434-
}
435431

436432
defaultConfig {
437433
minSdkVersion(21)

build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ buildscript {
1717
}
1818
}
1919
dependencies {
20-
classpath("com.android.tools.build:gradle:4.1.0")
21-
classpath("de.undercouch:gradle-download-task:4.0.2")
20+
classpath("com.android.tools.build:gradle:4.2.1")
21+
classpath("de.undercouch:gradle-download-task:4.1.1")
2222

2323
// NOTE: Do not place your application dependencies here; they belong
2424
// in the individual module build.gradle files

gradle.properties

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError
55
org.gradle.parallel=true
66

77
ANDROID_NDK_VERSION=20.1.5948944
8+
android.useAndroidX=true
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

packages/react-native-codegen/android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ buildscript {
1919
}
2020
}
2121
dependencies {
22-
classpath("com.android.tools.build:gradle:4.1.0")
22+
classpath("com.android.tools.build:gradle:4.2.1")
2323
}
2424
}
2525

Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

packages/react-native-codegen/android/gradlePlugin-build/gradlePlugin/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ gradlePlugin {
1919
}
2020

2121
dependencies {
22-
implementation 'com.android.tools.build:gradle:4.1.0'
22+
implementation 'com.android.tools.build:gradle:4.2.1'
2323
// Use the same Gson version that `com.android.tools.build:gradle` depends on.
2424
implementation 'com.google.code.gson:gson:2.8.5'
2525
implementation 'com.google.guava:guava:29.0-jre'

packages/react-native-gradle-plugin/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
plugins {
99
`java-gradle-plugin`
1010
`kotlin-dsl`
11-
kotlin("jvm") version "1.4.21"
11+
kotlin("jvm") version "1.4.20"
1212
}
1313

1414
repositories {
@@ -26,5 +26,5 @@ gradlePlugin {
2626
}
2727

2828
dependencies {
29-
implementation("com.android.tools.build:gradle:4.1.0")
29+
implementation("com.android.tools.build:gradle:4.2.1")
3030
}

packages/rn-tester/android/app/build.gradle

+1-4
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,7 @@ def useIntlJsc = false
131131
android {
132132
compileSdkVersion 29
133133
ndkVersion ANDROID_NDK_VERSION
134-
compileOptions {
135-
sourceCompatibility JavaVersion.VERSION_1_8
136-
targetCompatibility JavaVersion.VERSION_1_8
137-
}
134+
138135
dexOptions {
139136
javaMaxHeapSize "4g"
140137
}

template/android/app/build.gradle

-5
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,6 @@ android {
125125

126126
compileSdkVersion rootProject.ext.compileSdkVersion
127127

128-
compileOptions {
129-
sourceCompatibility JavaVersion.VERSION_1_8
130-
targetCompatibility JavaVersion.VERSION_1_8
131-
}
132-
133128
defaultConfig {
134129
applicationId "com.helloworld"
135130
minSdkVersion rootProject.ext.minSdkVersion

template/android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ buildscript {
1313
jcenter()
1414
}
1515
dependencies {
16-
classpath("com.android.tools.build:gradle:4.1.0")
16+
classpath("com.android.tools.build:gradle:4.2.1")
1717
// NOTE: Do not place your application dependencies here; they belong
1818
// in the individual module build.gradle files
1919
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

tools/build_defs/oss/rn_defs.bzl

+2-2
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ def rn_robolectric_test(name, srcs, vm_args = None, *args, **kwargs):
216216
"-XX:+UseConcMarkSweepGC", # required by -XX:+CMSClassUnloadingEnabled
217217
"-XX:+CMSClassUnloadingEnabled",
218218
"-XX:ReservedCodeCacheSize=150M",
219-
"-Drobolectric.dependency.dir=buck-out/gen/ReactAndroid/src/main/third-party/java/robolectric/4.4",
220-
"-Dlibraries=buck-out/gen/ReactAndroid/src/main/third-party/java/robolectric/4.4/*.jar",
219+
"-Drobolectric.dependency.dir=buck-out/gen/ReactAndroid/src/main/third-party/java/robolectric",
220+
"-Dlibraries=buck-out/gen/ReactAndroid/src/main/third-party/java/robolectric/*.jar",
221221
"-Drobolectric.logging.enabled=true",
222222
"-XX:MaxPermSize=620m",
223223
"-Drobolectric.offline=true",

0 commit comments

Comments
 (0)