Skip to content

Commit f558142

Browse files
janicduplessislnikkila
authored andcommitted
Use afterEvaluate to make gradle bundle task work with configureondemand
Summary: The js bundle task does not run when `org.gradle.configureondemand` is set to true. This uses `afterEvaluate` instead of `gradle.projectsEvaluated` which is executed properly. Add `org.gradle.configureondemand=true`, run RNTester in release mode and make sure the bundle task is run. [ANDROID] [BUGFIX] [LOCATION] - Fix release bundle task when org.gradle.configureondemand=true Closes facebook#18557 Differential Revision: D7396744 Pulled By: mdvacca fbshipit-source-id: 9ea134cb49e8a087cec16f82b990cd19af76785a
1 parent 859213c commit f558142

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

RNTester/android/app/gradle.properties

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
android.useDeprecatedNdk=true
2+
org.gradle.parallel=true
3+
org.gradle.configureondemand=true
24
MYAPP_RELEASE_STORE_FILE=my-release-key.keystore
35
MYAPP_RELEASE_KEY_ALIAS=my-key-alias
46
MYAPP_RELEASE_STORE_PASSWORD=*****

react.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void runBefore(String dependentTaskName, Task task) {
2323
}
2424
}
2525

26-
gradle.projectsEvaluated {
26+
afterEvaluate {
2727
// Grab all build types and product flavors
2828
def buildTypes = android.buildTypes.collect { type -> type.name }
2929
def productFlavors = android.productFlavors.collect { flavor -> flavor.name }

0 commit comments

Comments
 (0)