From 6b21109d3d64dc06c90a6775d3408bfe5f6b0f7a Mon Sep 17 00:00:00 2001 From: David Buchan-Swanson Date: Wed, 13 Feb 2019 13:16:14 -0800 Subject: [PATCH] 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: https://github.com/facebook/react-native/pull/18892 Differential Revision: D14069444 Pulled By: hramos fbshipit-source-id: 16e32a366b3b2e252a98a967da827ba1ebaeff85 --- react.gradle | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/react.gradle b/react.gradle index 4ead2b6b5d1..81431d403d6 100644 --- a/react.gradle +++ b/react.gradle @@ -76,9 +76,11 @@ afterEvaluate { "--reset-cache", "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir, *extraArgs) } - enabled config."bundleIn${targetName}" || - config."bundleIn${variant.buildType.name.capitalize()}" ?: - targetName.toLowerCase().contains("release") + enabled config."bundleIn${targetName}" != null + ? config."bundleIn${targetName}" + : config."bundleIn${buildTypeName.capitalize()}" != null + ? config."bundleIn${buildTypeName.capitalize()}" + : targetName.toLowerCase().contains("release") } // Expose a minimal interface on the application variant and the task itself: