Skip to content

Commit 184108f

Browse files
dulmandakhkelset
authored andcommitted
bump android gradle plugin to 3.4.0 (#24463)
Summary: This PR bumps Android Gradle Plugin to 3.4.0, which enables R8 shrinker by default and improves build performance significantly. Disabled R8 for ReactAndroid because it'll strip out AndroidX and other libraries bundled in ReactAndroid. [Android] [Changed] - bump Android Gradle plugin to 3.4.0 Pull Request resolved: #24463 Differential Revision: D15107117 Pulled By: hramos fbshipit-source-id: 35a03dc9955e889c9399faeaf9a862e0fc044fc4 # Conflicts: # ReactAndroid/gradle.properties # build.gradle # template/android/build.gradle
1 parent 4652392 commit 184108f

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

ReactAndroid/gradle.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ DOUBLE_CONVERSION_VERSION=1.1.6
2121
FOLLY_VERSION=2018.10.22.00
2222
GLOG_VERSION=0.3.5
2323
JSC_VERSION=236355.1.1
24+
25+
android.enableR8=false

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ buildscript {
1010
jcenter()
1111
}
1212
dependencies {
13-
classpath("com.android.tools.build:gradle:3.3.0")
13+
classpath("com.android.tools.build:gradle:3.4.0")
1414
classpath("de.undercouch:gradle-download-task:3.4.3")
1515

1616
// NOTE: Do not place your application dependencies here; they belong

react.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ afterEvaluate {
146146
into ("merged_assets/${variant.name}/merge${targetName}Assets/out") {
147147
from(jsBundleDir)
148148
}
149+
150+
// Workaround for Android Gradle Plugin 3.4+ new asset directory
151+
into ("merged_assets/${variant.name}/out") {
152+
from(jsBundleDir)
153+
}
149154
}
150155

151156
// mergeAssets must run first, as it clears the intermediates directory

template/android/build.gradle

Lines changed: 1 addition & 1 deletion
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:3.3.0'
16+
classpath("com.android.tools.build:gradle:3.4.0")
1717

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

0 commit comments

Comments
 (0)