Use configureEach

Co-authored-by: Simon Marquis <contact@simon-marquis.fr>
ja/coverage_agp
Jose Alcérreca 2 years ago committed by GitHub
parent 8094ba7f0d
commit 9ac5e28d13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -25,10 +25,10 @@ class AndroidLibraryJacocoConventionPlugin : Plugin<Project> {
with(target) {
val androidExtension: LibraryExtension = extensions.getByType<LibraryExtension>()
androidExtension.buildTypes.forEach { buildType ->
androidExtension.buildTypes.configureEach {
// The jacoco plugin is applied automatically when any of these are set
buildType.enableAndroidTestCoverage = true
buildType.enableUnitTestCoverage = true
enableAndroidTestCoverage = true
enableUnitTestCoverage = true
}
val extension = extensions.getByType<LibraryAndroidComponentsExtension>()

Loading…
Cancel
Save