Skip to content

Commit c794c36

Browse files
comigorRichard Hua
authored and
Richard Hua
committed
Allow output directory of CodePushHash.json to be customized (#712)
Remove `assetsDir` variable, as `generateBundledResourcesHash.js` should output `CodePushHash.json` to `jsBundleDir${targetName}` folder, and not the hardcoded `$buildDir/intermediates/assets/${targetPath}` one.
1 parent 73f0984 commit c794c36

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

android/codepush.gradle

+2-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ gradle.projectsEvaluated {
3636
"${buildTypeName}"
3737

3838
def jsBundleDirConfigName = "jsBundleDir${targetName}"
39-
def assetsDir = "$buildDir/intermediates/assets/${targetPath}"
4039
def jsBundleDir = elvisFile(config."$jsBundleDirConfigName") ?:
41-
file(assetsDir)
40+
file("$buildDir/intermediates/assets/${targetPath}")
4241

4342
def resourcesDirConfigName = "jsBundleDir${targetName}"
4443
def resourcesDir = elvisFile(config."${resourcesDirConfigName}") ?:
@@ -68,7 +67,7 @@ gradle.projectsEvaluated {
6867
def generateBundledResourcesHash = tasks.create(
6968
name: "generateBundledResourcesHash${targetName}",
7069
type: Exec) {
71-
commandLine "node", "${nodeModulesPath}/react-native-code-push/scripts/generateBundledResourcesHash.js", resourcesDir, "$jsBundleDir/$bundleAssetName", assetsDir
70+
commandLine "node", "${nodeModulesPath}/react-native-code-push/scripts/generateBundledResourcesHash.js", resourcesDir, "$jsBundleDir/$bundleAssetName", jsBundleDir
7271
}
7372

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

0 commit comments

Comments
 (0)