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

Commit 658e81a

Browse files
mikelambertsergey-akhalkov
authored andcommitted
Fix dependency issue (#902)
Fix this crash I see when building for android: ``` :app:generateBundledResourcesHashDebug module.js:471 throw err; ^ Error: Cannot find module '/var/folders/94/wngs1jw91_n2_jjjrfljtqrc0000gn/T/CodePushResourcesMap-1b95774b.json' ``` Looks like these two tasks (`recordFileBeforeBundleCommand` and `generateBundledResourcesHash`) run in parallel, which create problems because one depends on a file generated by the other. Not sure why others don't have this issue, though, but I suspect this is exactly the issue reported in #836
1 parent 3ee9319 commit 658e81a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

android/codepush.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ gradle.projectsEvaluated {
8080
commandLine (*nodeExecutableAndArgs, "${nodeModulesPath}/react-native-code-push/scripts/generateBundledResourcesHash.js", resourcesDir, "$jsBundleDir/$bundleAssetName", jsBundleDir, resourcesMapTempFileName)
8181
}
8282

83+
// We need to generate and record the resources map, but we use it to generate the bundle hash
84+
generateBundledResourcesHash.dependsOn("recordFilesBeforeBundleCommand${targetName}")
85+
8386
generateBundledResourcesHash.dependsOn("bundle${targetName}JsAndAssets")
8487
runBefore("processArmeabi-v7a${targetName}Resources", generateBundledResourcesHash)
8588
runBefore("processX86${targetName}Resources", generateBundledResourcesHash)

0 commit comments

Comments
 (0)