Re-land config lib dependencies for flavors (#34668)

This commit is contained in:
Emmanuel Garcia
2019-06-18 22:37:42 -07:00
committed by Todd Volkert
parent 4f5d901395
commit c50fa3d2bd
6 changed files with 170 additions and 106 deletions

View File

@@ -585,8 +585,12 @@ File _findBundleFile(GradleProject project, BuildInfo buildInfo) {
if (bundleFile.existsSync())
return bundleFile;
if (buildInfo.flavor != null) {
// Android Studio Gradle plugin v3 adds the flavor to the path. For the bundle the folder name is the flavor plus the mode name.
bundleFile = project.bundleDirectory.childDirectory(buildInfo.flavor + modeName).childFile(bundleFileName);
// On linux, filenames are case sensitive.
bundleFile = project.bundleDirectory
.childDirectory(camelCase('${buildInfo.flavor}_$modeName'))
.childFile(bundleFileName);
if (bundleFile.existsSync())
return bundleFile;
}