diff options
| author | Peter Stone <thepeterstone@gmail.com> | 2026-09-26 17:37:33 +0000 |
|---|---|---|
| committer | Peter Stone <thepeterstone@gmail.com> | 2026-09-26 17:37:33 +0000 |
| commit | aa9c0a386f19bb58c50c81fd79d9509d2883cffe (patch) | |
| tree | f9ede8c3020c3a82e20f565e6c5373cc426b2200 /app/build.gradle.kts | |
| parent | 4488a3f49cadcdcd37ce29bedf49d0369983bfb1 (diff) | |
Skip marked breaks by default, and drop the instrumented-coverage half
Two things.
Ad-chapter skipping is on by default, at Peter's request after living with it.
It shipped off out of caution, being the one part of the skip feature that
removes audio nobody has heard -- but it only ever acts on sections a publisher
explicitly marked as not content, never on a guess from a title, and doing that
without being asked each time is the point. Migration 5 -> 6 moves existing
shows rather than leaving the new default to apply only to new ones.
The column's SQL default stays 0 while the Kotlin default becomes true. Room
writes every column on insert, so the SQL default is only ever consulted by an
ALTER TABLE that has already happened; changing it would mean recreating the
table for a value nothing reads. Said so at the field.
Two unit tests were leaning on the old default to mean "not opted in". They now
say `skipAdChapters = false` explicitly, which is what they meant.
Second: enableAndroidTestCoverage is gone again, a day after adding it. It was
the "both" half of the coverage change, and measuring it made the trade
obvious -- it instruments every class in the debug build, which cost 25MB on
the APK (118MB -> 143MB) plus runtime probes, on every sideload, for a report
that would be run rarely. I had already published one of those builds. The
framework-adapter exclusions carry this on their own; they are what moved the
number from 65% to 90%, and what makes a future drop mean something.
No permission changes. 428 unit tests green, 6 migration tests on a device,
detekt and lint clean, coverage 89.97 -> 90.12.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018AwnALZL6bD4VBtATDVv3B
Diffstat (limited to 'app/build.gradle.kts')
| -rw-r--r-- | app/build.gradle.kts | 36 |
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") }) -} |
