Skip to content

Commit

Permalink
change gradlew jacoco
Browse files Browse the repository at this point in the history
  • Loading branch information
mshdabiola committed Jun 14, 2024
1 parent d65d46b commit 5bb751b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -7,12 +8,15 @@ import org.gradle.kotlin.dsl.getByType
class AndroidApplicationJacocoConventionPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
with(pluginManager) {
apply("org.gradle.jacoco")
apply("com.android.application")
pluginManager.apply("jacoco")
val androidExtension = extensions.getByType<BaseAppModuleExtension>()

androidExtension.buildTypes.configureEach {
enableAndroidTestCoverage = true
enableUnitTestCoverage = true
}
val extension = extensions.getByType<ApplicationAndroidComponentsExtension>()
configureJacoco(extension)

configureJacoco(extensions.getByType<ApplicationAndroidComponentsExtension>())
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -7,12 +8,15 @@ import org.gradle.kotlin.dsl.getByType
class AndroidLibraryJacocoConventionPlugin : Plugin<Project> {
override fun apply(target: Project) {
with(target) {
with(pluginManager) {
apply("org.gradle.jacoco")
apply("com.android.library")
pluginManager.apply("jacoco")
val androidExtension = extensions.getByType<LibraryExtension>()

androidExtension.buildTypes.configureEach {
enableAndroidTestCoverage = true
enableUnitTestCoverage = true
}
val extension = extensions.getByType<LibraryAndroidComponentsExtension>()
configureJacoco(extension)

configureJacoco(extensions.getByType<LibraryAndroidComponentsExtension>())
}
}

Expand Down
2 changes: 1 addition & 1 deletion fastlane/metadata/android/en-US/full_description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5bb751b

Please sign in to comment.