Skip to content

Commit

Permalink
Fix apk/aab missing bundle file with gradle plugin with 4.1.0/gradle 6.5
Browse files Browse the repository at this point in the history
Ensure mergeResources task runs after currentAssetsCopyTask
  • Loading branch information
tomoima525 committed Oct 14, 2020
1 parent cd6ebcd commit a6c7049
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions react.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,11 @@ afterEvaluate {
enabled(currentBundleTask.enabled)
}

// mergeResources task runs before the bundle file is copied to the intermediate asset directory from Android plugin 4.1+.
// This ensures to copy the bundle file before mergeResources task starts
def mergeResourcesTask = tasks.findByName("merge${targetName}Resources")
mergeResourcesTask.dependsOn(currentAssetsCopyTask)

packageTask.dependsOn(currentAssetsCopyTask)
if (buildPreBundleTask != null) {
buildPreBundleTask.dependsOn(currentAssetsCopyTask)
Expand Down

0 comments on commit a6c7049

Please sign in to comment.