@@ -2,6 +2,7 @@ import org.apache.tools.ant.taskdefs.condition.Os
2
2
3
3
def config = project. hasProperty(" react" ) ? project. react : [];
4
4
5
+ def cliPath = config. cliPath ?: " node_modules/react-native/local-cli/cli.js"
5
6
def bundleAssetName = config. bundleAssetName ?: " index.android.bundle"
6
7
def entryFile = config. entryFile ?: " index.android.js"
7
8
@@ -79,10 +80,10 @@ gradle.projectsEvaluated {
79
80
def devEnabled = ! (config. " devDisabledIn${ targetName} "
80
81
|| targetName. toLowerCase(). contains(" release" ))
81
82
if (Os . isFamily(Os . FAMILY_WINDOWS )) {
82
- commandLine(" cmd" , " /c" , * nodeExecutableAndArgs, " node_modules/react-native/local-cli/cli.js " , " bundle" , " --platform" , " android" , " --dev" , " ${ devEnabled} " ,
83
+ commandLine(" cmd" , " /c" , * nodeExecutableAndArgs, cliPath , " bundle" , " --platform" , " android" , " --dev" , " ${ devEnabled} " ,
83
84
" --reset-cache" , " --entry-file" , entryFile, " --bundle-output" , jsBundleFile, " --assets-dest" , resourcesDir, * extraPackagerArgs)
84
85
} else {
85
- commandLine(* nodeExecutableAndArgs, " node_modules/react-native/local-cli/cli.js " , " bundle" , " --platform" , " android" , " --dev" , " ${ devEnabled} " ,
86
+ commandLine(* nodeExecutableAndArgs, cliPath , " bundle" , " --platform" , " android" , " --dev" , " ${ devEnabled} " ,
86
87
" --reset-cache" , " --entry-file" , entryFile, " --bundle-output" , jsBundleFile, " --assets-dest" , resourcesDir, * extraPackagerArgs)
87
88
}
88
89
0 commit comments