diff --git a/build.gradle.kts b/build.gradle.kts index 2c04f8f5b..f5a59cbcc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -55,7 +55,7 @@ subprojects { "sonar.gradle.skipCompile" to true, "sonar.sources" to "${projectDir}/src/main/kotlin", "sonar.java.binaries" to layout.buildDirectory, -// "sonar.coverage.jacoco.xmlReportPaths" to "${layout.buildDirectory}/reports/jacoco/xml/jacoco.xml" + "sonar.coverage.jacoco.xmlReportPaths" to "${layout.buildDirectory}/reports/jacoco/xml/jacoco.xml" ) ) } diff --git a/buildSrc/src/main/kotlin/jacoco-report.gradle.kts b/buildSrc/src/main/kotlin/jacoco-report.gradle.kts index d29b82546..8daea975b 100644 --- a/buildSrc/src/main/kotlin/jacoco-report.gradle.kts +++ b/buildSrc/src/main/kotlin/jacoco-report.gradle.kts @@ -37,25 +37,25 @@ private val executionDataTree = fileTree(project.layout.buildDirectory) { ) } -//tasks { -// register("jacocoDebugTestReport") { -// group = "Reporting" -// description = "Code coverage report for both Android and Unit tests." -// -// dependsOn("testDebugUnitTest") -// reports { -// xml.required.set(true) -// html.required.set(true) -// html.outputLocation.set(file("${layout.buildDirectory}/reports/jacoco/html")) -// xml.outputLocation.set(file("${layout.buildDirectory}/reports/jacoco/xml/jacoco.xml")) -// } -// sourceDirectories.setFrom(sourceDirectoriesTree) -// classDirectories.setFrom(files(classDirectoriesTree)) -// executionData.setFrom(executionDataTree) -// } -//} -// -//afterEvaluate { -// project.tasks.getByName("testDebugUnitTest") -// .finalizedBy("jacocoDebugTestReport") -//} \ No newline at end of file +tasks { + register("jacocoDebugTestReport") { + group = "Reporting" + description = "Code coverage report for both Android and Unit tests." + + dependsOn("testDebugUnitTest") + reports { + xml.required.set(true) + html.required.set(true) + html.outputLocation.set(file("${layout.buildDirectory}/reports/jacoco/html")) + xml.outputLocation.set(file("${layout.buildDirectory}/reports/jacoco/xml/jacoco.xml")) + } + sourceDirectories.setFrom(sourceDirectoriesTree) + classDirectories.setFrom(files(classDirectoriesTree)) + executionData.setFrom(executionDataTree) + } +} + +afterEvaluate { + project.tasks.getByName("testDebugUnitTest") + .finalizedBy("jacocoDebugTestReport") +} \ No newline at end of file diff --git a/core/android/build.gradle.kts b/core/android/build.gradle.kts index 7d31f79b9..e0763d4af 100644 --- a/core/android/build.gradle.kts +++ b/core/android/build.gradle.kts @@ -4,7 +4,7 @@ plugins { alias(libs.plugins.sqlDelight) alias(libs.plugins.google.ksp) id("publish-module-android") -// id("jacoco-report") + id("jacoco-report") } project.apply { diff --git a/product/walletconnectmodal/build.gradle.kts b/product/walletconnectmodal/build.gradle.kts index e8f4f8d4b..fe33dd93f 100644 --- a/product/walletconnectmodal/build.gradle.kts +++ b/product/walletconnectmodal/build.gradle.kts @@ -4,7 +4,7 @@ plugins { alias(libs.plugins.google.ksp) alias(libs.plugins.paparazzi) id("publish-module-android") -// id("jacoco-report") + id("jacoco-report") } project.apply { diff --git a/product/web3modal/build.gradle.kts b/product/web3modal/build.gradle.kts index 6e2820b73..e3a4d655c 100644 --- a/product/web3modal/build.gradle.kts +++ b/product/web3modal/build.gradle.kts @@ -4,7 +4,7 @@ plugins { alias(libs.plugins.google.ksp) alias(libs.plugins.paparazzi) id("publish-module-android") -// id("jacoco-report") + id("jacoco-report") } project.apply { diff --git a/product/web3wallet/build.gradle.kts b/product/web3wallet/build.gradle.kts index 949cdf9e9..9fdeeeb44 100644 --- a/product/web3wallet/build.gradle.kts +++ b/product/web3wallet/build.gradle.kts @@ -3,7 +3,7 @@ plugins { id(libs.plugins.kotlin.android.get().pluginId) alias(libs.plugins.google.ksp) id("publish-module-android") -// id("jacoco-report") + id("jacoco-report") } project.apply { diff --git a/protocol/auth/build.gradle.kts b/protocol/auth/build.gradle.kts index cda72dee1..081519b00 100644 --- a/protocol/auth/build.gradle.kts +++ b/protocol/auth/build.gradle.kts @@ -4,7 +4,7 @@ plugins { alias(libs.plugins.sqlDelight) alias(libs.plugins.google.ksp) id("publish-module-android") -// id("jacoco-report") + id("jacoco-report") } project.apply { diff --git a/protocol/chat/build.gradle.kts b/protocol/chat/build.gradle.kts index b3e98c6b5..5e7639560 100644 --- a/protocol/chat/build.gradle.kts +++ b/protocol/chat/build.gradle.kts @@ -4,7 +4,7 @@ plugins { alias(libs.plugins.sqlDelight) alias(libs.plugins.google.ksp) id("publish-module-android") -// id("jacoco-report") + id("jacoco-report") } project.apply { diff --git a/protocol/notify/build.gradle.kts b/protocol/notify/build.gradle.kts index 1ed0feecf..10c7b0560 100644 --- a/protocol/notify/build.gradle.kts +++ b/protocol/notify/build.gradle.kts @@ -4,7 +4,7 @@ plugins { alias(libs.plugins.sqlDelight) alias(libs.plugins.google.ksp) id("publish-module-android") -// id("jacoco-report") + id("jacoco-report") } project.apply { diff --git a/protocol/sign/build.gradle.kts b/protocol/sign/build.gradle.kts index 68881886d..f029b17a8 100644 --- a/protocol/sign/build.gradle.kts +++ b/protocol/sign/build.gradle.kts @@ -4,7 +4,7 @@ plugins { alias(libs.plugins.sqlDelight) alias(libs.plugins.google.ksp) id("publish-module-android") -// id("jacoco-report") + id("jacoco-report") } project.apply {