Fixed the issue due to which js assets are not bundled in the apk when separate build for different CPU architectures is enabled
Summary: This PR tries to fix a minor bug in `react.gradle` due to which task that bundles JS into the assets folder of the APK is not run when separate build per CPU architecture is enabled and we are using different product flavors. Closes https://github.com/facebook/react-native/pull/8675 Differential Revision: D3541348 fbshipit-source-id: 4c84f21a06a45046f84bdd8ae5c5d834ec080476
This commit is contained in:
parent
65ff8192dd
commit
c0316c695d
|
@ -31,7 +31,9 @@ gradle.projectsEvaluated {
|
||||||
productFlavors.each { productFlavorName ->
|
productFlavors.each { productFlavorName ->
|
||||||
buildTypes.each { buildTypeName ->
|
buildTypes.each { buildTypeName ->
|
||||||
// Create variant and target names
|
// Create variant and target names
|
||||||
def targetName = "${productFlavorName.capitalize()}${buildTypeName.capitalize()}"
|
def flavorNameCapitalized = "${productFlavorName.capitalize()}"
|
||||||
|
def buildNameCapitalized = "${buildTypeName.capitalize()}"
|
||||||
|
def targetName = "${flavorNameCapitalized}${buildNameCapitalized}"
|
||||||
def targetPath = productFlavorName ?
|
def targetPath = productFlavorName ?
|
||||||
"${productFlavorName}/${buildTypeName}" :
|
"${productFlavorName}/${buildTypeName}" :
|
||||||
"${buildTypeName}"
|
"${buildTypeName}"
|
||||||
|
@ -92,8 +94,8 @@ gradle.projectsEvaluated {
|
||||||
currentBundleTask.dependsOn("merge${targetName}Resources")
|
currentBundleTask.dependsOn("merge${targetName}Resources")
|
||||||
currentBundleTask.dependsOn("merge${targetName}Assets")
|
currentBundleTask.dependsOn("merge${targetName}Assets")
|
||||||
|
|
||||||
runBefore("processArmeabi-v7a${targetName}Resources", currentBundleTask)
|
runBefore("process${flavorNameCapitalized}Armeabi-v7a${buildNameCapitalized}Resources", currentBundleTask)
|
||||||
runBefore("processX86${targetName}Resources", currentBundleTask)
|
runBefore("process${flavorNameCapitalized}X86${buildNameCapitalized}Resources", currentBundleTask)
|
||||||
runBefore("processUniversal${targetName}Resources", currentBundleTask)
|
runBefore("processUniversal${targetName}Resources", currentBundleTask)
|
||||||
runBefore("process${targetName}Resources", currentBundleTask)
|
runBefore("process${targetName}Resources", currentBundleTask)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue