summaryrefslogtreecommitdiff
path: root/app/build.gradle.kts
diff options
context:
space:
mode:
Diffstat (limited to 'app/build.gradle.kts')
-rw-r--r--app/build.gradle.kts36
1 files changed, 5 insertions, 31 deletions
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index eba61d1..bcbe4f9 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -99,9 +99,11 @@ android {
buildTypes {
debug {
enableUnitTestCoverage = true
- // Produces device coverage data for jacocoFullReport. The commit gate deliberately
- // does not read it -- see that task.
- enableAndroidTestCoverage = true
+ // No enableAndroidTestCoverage. Turning it on to feed instrumented data into a
+ // coverage report instruments every class in the debug build: measured, it added
+ // 25MB to the APK (118MB -> 143MB) and runtime probes to code Peter actually uses.
+ // That is a real cost on every sideload for a report that would be run rarely, so
+ // the framework-adapter exclusions carry this on their own.
}
release {
isMinifyEnabled = false
@@ -297,31 +299,3 @@ tasks.register<JacocoReport>("jacocoTestReport") {
sourceDirectories.setFrom(files("src/main/java"))
executionData.setFrom(fileTree(layout.buildDirectory) { include("**/*.exec") })
}
-
-/**
- * Unit *and* instrumented coverage, for when you want the fuller picture.
- *
- * Deliberately not what the commit gate reads. Instrumented data only exists after a device run,
- * so folding it into the gate would make the number depend on whether one happened recently and
- * on stale .ec files lying around -- a gate that reports different figures for identical code is
- * worse than a narrow one. Run this with a device attached:
- *
- * ./gradlew connectedDebugAndroidTest jacocoFullReport
- */
-tasks.register<JacocoReport>("jacocoFullReport") {
- dependsOn("testDebugUnitTest")
- reports {
- xml.required.set(true)
- html.required.set(true)
- }
- val kotlinDebugTree = fileTree("${layout.buildDirectory.get()}/tmp/kotlin-classes/debug") {
- exclude(coverageExclusions)
- }
- val javaDebugTree = fileTree("${layout.buildDirectory.get()}/intermediates/javac/debug") {
- exclude(coverageExclusions)
- }
- classDirectories.setFrom(files(kotlinDebugTree, javaDebugTree))
- sourceDirectories.setFrom(files("src/main/java"))
- // .ec is what a device run writes, alongside the JVM run's .exec.
- executionData.setFrom(fileTree(layout.buildDirectory) { include("**/*.exec", "**/*.ec") })
-}