From 5bb751b47300100ee6f4e7237c3fb3cba4203a39 Mon Sep 17 00:00:00 2001 From: mshdabiola Date: Fri, 14 Jun 2024 15:14:25 +0100 Subject: [PATCH] change gradlew jacoco --- .../AndroidApplicationJacocoConventionPlugin.kt | 14 +++++++++----- .../kotlin/AndroidLibraryJacocoConventionPlugin.kt | 14 +++++++++----- .../metadata/android/en-US/full_description.txt | 2 +- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/build-logic/convention/src/main/kotlin/AndroidApplicationJacocoConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidApplicationJacocoConventionPlugin.kt index 418e1353..58dda537 100644 --- a/build-logic/convention/src/main/kotlin/AndroidApplicationJacocoConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidApplicationJacocoConventionPlugin.kt @@ -1,4 +1,5 @@ import com.android.build.api.variant.ApplicationAndroidComponentsExtension +import com.android.build.gradle.internal.dsl.BaseAppModuleExtension import com.mshdabiola.app.configureJacoco import org.gradle.api.Plugin import org.gradle.api.Project @@ -7,12 +8,15 @@ import org.gradle.kotlin.dsl.getByType class AndroidApplicationJacocoConventionPlugin : Plugin { override fun apply(target: Project) { with(target) { - with(pluginManager) { - apply("org.gradle.jacoco") - apply("com.android.application") + pluginManager.apply("jacoco") + val androidExtension = extensions.getByType() + + androidExtension.buildTypes.configureEach { + enableAndroidTestCoverage = true + enableUnitTestCoverage = true } - val extension = extensions.getByType() - configureJacoco(extension) + + configureJacoco(extensions.getByType()) } } diff --git a/build-logic/convention/src/main/kotlin/AndroidLibraryJacocoConventionPlugin.kt b/build-logic/convention/src/main/kotlin/AndroidLibraryJacocoConventionPlugin.kt index fcac0f3a..a7333b08 100644 --- a/build-logic/convention/src/main/kotlin/AndroidLibraryJacocoConventionPlugin.kt +++ b/build-logic/convention/src/main/kotlin/AndroidLibraryJacocoConventionPlugin.kt @@ -1,3 +1,4 @@ +import com.android.build.api.dsl.LibraryExtension import com.android.build.api.variant.LibraryAndroidComponentsExtension import com.mshdabiola.app.configureJacoco import org.gradle.api.Plugin @@ -7,12 +8,15 @@ import org.gradle.kotlin.dsl.getByType class AndroidLibraryJacocoConventionPlugin : Plugin { override fun apply(target: Project) { with(target) { - with(pluginManager) { - apply("org.gradle.jacoco") - apply("com.android.library") + pluginManager.apply("jacoco") + val androidExtension = extensions.getByType() + + androidExtension.buildTypes.configureEach { + enableAndroidTestCoverage = true + enableUnitTestCoverage = true } - val extension = extensions.getByType() - configureJacoco(extension) + + configureJacoco(extensions.getByType()) } } diff --git a/fastlane/metadata/android/en-US/full_description.txt b/fastlane/metadata/android/en-US/full_description.txt index fe157cd7..7aaf5376 100755 --- a/fastlane/metadata/android/en-US/full_description.txt +++ b/fastlane/metadata/android/en-US/full_description.txt @@ -10,7 +10,7 @@ MAIN FEATURES * Offline Access: Never lose your notes, even without an internet connection. * Seamless Collaboration: Share notes via email or messaging for effective teamwork. -Play NotePad is more than just a notepad - it's your essential companion for managing and organizing your notes in style.** +Play NotePad is more than just a notepad - it's your essential companion for managing and organizing your notes in style. Source code: