Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions react.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def detectEntryFile(config) {
return "index.js";
}

def cliPath = config.cliPath ?: "node_modules/react-native/cli.js"
def defaultCliPath = "node_modules/react-native/cli.js"
def composeSourceMapsPath = config.composeSourceMapsPath ?: "node_modules/react-native/scripts/compose-source-maps.js"
def bundleAssetName = config.bundleAssetName ?: "index.android.bundle"
def entryFile = detectEntryFile(config)
Expand Down Expand Up @@ -104,13 +104,12 @@ afterEvaluate {

if (config.cliPath || config.nodeExecutableAndArgs) {
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
execCommand.addAll(["cmd", "/c", *nodeExecutableAndArgs, cliPath])
execCommand.addAll(["cmd", "/c", *nodeExecutableAndArgs, config.cliPath])
} else {
execCommand.addAll([*nodeExecutableAndArgs, cliPath])
execCommand.addAll([*nodeExecutableAndArgs, config.cliPath])
}
} else {
throw new Exception("Missing cliPath or nodeExecutableAndArgs from build config. " +
"Please set project.ext.react.cliPath to the path of the react-native cli.js");
execCommand.add(defaultCliPath)
Comment thread
grabbou marked this conversation as resolved.
Outdated
}

def enableHermes = enableHermesForVariant(variant)
Expand Down