Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 3761d9e

Browse files
iacopo87sergey-akhalkov
authored andcommitted
Allow custom node path(#773) (#860)
1 parent a59e4cf commit 3761d9e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

android/codepush.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,14 @@ gradle.projectsEvaluated {
5454

5555
def resourcesMapTempFileName = "CodePushResourcesMap-" + java.util.UUID.randomUUID().toString().substring(0,8) + ".json"
5656

57+
// Additional node commandline arguments
58+
def nodeExecutableAndArgs = config.nodeExecutableAndArgs ?: ["node"]
59+
5760
// Make this task run right before the bundle task
5861
def recordFilesBeforeBundleCommand = tasks.create(
5962
name: "recordFilesBeforeBundleCommand${targetName}",
6063
type: Exec) {
61-
commandLine "node", "${nodeModulesPath}/react-native-code-push/scripts/recordFilesBeforeBundleCommand.js", resourcesDir, resourcesMapTempFileName
64+
commandLine (*nodeExecutableAndArgs, "${nodeModulesPath}/react-native-code-push/scripts/recordFilesBeforeBundleCommand.js", resourcesDir, resourcesMapTempFileName)
6265
}
6366

6467
recordFilesBeforeBundleCommand.dependsOn("merge${targetName}Resources")
@@ -69,7 +72,7 @@ gradle.projectsEvaluated {
6972
def generateBundledResourcesHash = tasks.create(
7073
name: "generateBundledResourcesHash${targetName}",
7174
type: Exec) {
72-
commandLine "node", "${nodeModulesPath}/react-native-code-push/scripts/generateBundledResourcesHash.js", resourcesDir, "$jsBundleDir/$bundleAssetName", jsBundleDir, resourcesMapTempFileName
75+
commandLine (*nodeExecutableAndArgs, "${nodeModulesPath}/react-native-code-push/scripts/generateBundledResourcesHash.js", resourcesDir, "$jsBundleDir/$bundleAssetName", jsBundleDir, resourcesMapTempFileName)
7376
}
7477

7578
generateBundledResourcesHash.dependsOn("bundle${targetName}JsAndAssets")

0 commit comments

Comments
 (0)