Skip to content

Commit a8e009f

Browse files
committed
Allow bundle task to be disabled for release
The current system would always end up falling back to `true` for release builds
1 parent a90d0e3 commit a8e009f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

react.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,11 @@ afterEvaluate {
9999
"--reset-cache", "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir, *extraArgs)
100100
}
101101

102-
enabled config."bundleIn${targetName}" ||
103-
config."bundleIn${buildTypeName.capitalize()}" ?:
104-
targetName.toLowerCase().contains("release")
102+
enabled config."bundleIn${targetName}" != null
103+
? config."bundleIn${targetName}"
104+
: config."bundleIn${buildTypeName.capitalize()}" != null
105+
? config."bundleIn${buildTypeName.capitalize()}"
106+
: targetName.toLowerCase().contains("release")
105107

106108
if (isAndroidLibrary) {
107109
doLast {

0 commit comments

Comments
 (0)