diff --git a/app/build.gradle b/app/build.gradle index b63e310f4..9a59bf57d 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -254,7 +254,7 @@ android { namespace 'org.mozilla.fenix' } -android.applicationVariants.all { variant -> +android.applicationVariants.configureEach { variant -> // ------------------------------------------------------------------------------------------------- // Generate version codes for builds @@ -709,7 +709,7 @@ if (project.hasProperty("coverage")) { toolVersion = Versions.jacoco } - android.applicationVariants.all { variant -> + android.applicationVariants.configureEach { variant -> tasks.register("jacoco${variant.name.capitalize()}TestReport", JacocoReport) { dependsOn "test${variant.name.capitalize()}UnitTest" @@ -847,7 +847,7 @@ if (gradle.hasProperty('localProperties.autoPublish.glean.dir')) { apply from: "../${gleanSrcDir}/build-scripts/substitute-local-glean.gradle" } -android.applicationVariants.all { variant -> +android.applicationVariants.configureEach { variant -> tasks.register("apkSize${variant.name.capitalize()}", ApkSizeTask) { variantName = variant.name apks = variant.outputs.collect { output -> output.outputFile.name } diff --git a/benchmark/build.gradle b/benchmark/build.gradle index 509794ab6..e917c0bdd 100644 --- a/benchmark/build.gradle +++ b/benchmark/build.gradle @@ -46,7 +46,7 @@ android { * and that's applied to the app module. Since there are no other uses of the glean plugin in the * benchmark module, we do this manually here. */ -configurations.all { +configurations.configureEach { resolutionStrategy.capabilitiesResolution.withCapability("org.mozilla.telemetry:glean-native") { def toBeSelected = candidates.find { it.id instanceof ModuleComponentIdentifier && it.id.module.contains('geckoview') } if (toBeSelected != null) {