Skip to content

Commit

Permalink
bump android gradle plugin to 3.4.0 (#24463)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dulmandakh authored and kelset committed Jun 5, 2019
1 parent 4652392 commit 184108f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ReactAndroid/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ DOUBLE_CONVERSION_VERSION=1.1.6
FOLLY_VERSION=2018.10.22.00
GLOG_VERSION=0.3.5
JSC_VERSION=236355.1.1

android.enableR8=false
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:3.3.0")
classpath("com.android.tools.build:gradle:3.4.0")
classpath("de.undercouch:gradle-download-task:3.4.3")

// NOTE: Do not place your application dependencies here; they belong
Expand Down
5 changes: 5 additions & 0 deletions react.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ afterEvaluate {
into ("merged_assets/${variant.name}/merge${targetName}Assets/out") {
from(jsBundleDir)
}

// Workaround for Android Gradle Plugin 3.4+ new asset directory
into ("merged_assets/${variant.name}/out") {
from(jsBundleDir)
}
}

// mergeAssets must run first, as it clears the intermediates directory
Expand Down
2 changes: 1 addition & 1 deletion template/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath("com.android.tools.build:gradle:3.4.0")

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

0 comments on commit 184108f

Please sign in to comment.