Skip to content

Commit

Permalink
Merge pull request #177 from google/davidmotson.4.3.7
Browse files Browse the repository at this point in the history
Davidmotson.4.3.7
  • Loading branch information
davidmotson authored May 17, 2021
2 parents 0a3c7a6 + 504b230 commit e40a3f6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion google-services-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}

group = 'com.google.gms'
version = '4.3.5'
version = '4.3.8'
project.ext.archivesBaseName = 'google-services'
project.ext.pomDesc = 'Gradle plug-in to build Firebase applications.'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,9 @@ class GoogleServicesPlugin implements Plugin<Project> {
"process${variant.name.capitalize()}GoogleServices",
GoogleServicesTask) { task ->
task.setIntermediateDir(outputDir)
task.setVariantDir(variant.dirName)
task.applicationId.set(variant.applicationId)
task.setBuildType(variant.buildType.name)
task.setProductFlavors(variant.productFlavors.collect { it.name })

// This is necessary for backwards compatibility with versions of gradle that do not support
// this new API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ private static long countSlashes(String input) {
static List<String> getJsonLocations(String buildType, List<String> flavorNames) {
List<String> fileLocations = new ArrayList<>();
String flavorName = flavorNames.stream().reduce("", (a,b) -> a + (a.length() == 0 ? b : capitalize(b)));
fileLocations.add("");
fileLocations.add("src/" + flavorName + "/" + buildType);
fileLocations.add("src/" + buildType + "/" + flavorName);
fileLocations.add("src/" + flavorName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public void testOneFlavor() {
toStringList(GoogleServicesTask.getJsonLocations("release", Collections.singletonList("flavor")));
assertThat(output)
.containsAllOf(
"google-services.json",
"src/release/google-services.json",
"src/flavorRelease/google-services.json",
"src/flavor/google-services.json",
Expand All @@ -52,6 +53,7 @@ public void testMultipleFlavors() {
toStringList(GoogleServicesTask.getJsonLocations("release", Arrays.asList("flavor", "test")));
assertThat(output)
.containsAllOf(
"google-services.json",
"src/release/google-services.json",
"src/flavorRelease/google-services.json",
"src/flavor/google-services.json",
Expand Down

0 comments on commit e40a3f6

Please sign in to comment.