Skip to content

Commit 6b21109

Browse files
deecewanfacebook-github-bot
authored andcommitted
Allow bundle task to be disabled for release (#18892)
Summary: The current system would always end up falling back to `true` for release builds Pull Request resolved: #18892 Differential Revision: D14069444 Pulled By: hramos fbshipit-source-id: 16e32a366b3b2e252a98a967da827ba1ebaeff85
1 parent 4c400a1 commit 6b21109

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
@@ -76,9 +76,11 @@ afterEvaluate {
7676
"--reset-cache", "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir, *extraArgs)
7777
}
7878

79-
enabled config."bundleIn${targetName}" ||
80-
config."bundleIn${variant.buildType.name.capitalize()}" ?:
81-
targetName.toLowerCase().contains("release")
79+
enabled config."bundleIn${targetName}" != null
80+
? config."bundleIn${targetName}"
81+
: config."bundleIn${buildTypeName.capitalize()}" != null
82+
? config."bundleIn${buildTypeName.capitalize()}"
83+
: targetName.toLowerCase().contains("release")
8284
}
8385

8486
// Expose a minimal interface on the application variant and the task itself:

0 commit comments

Comments
 (0)