Repository navigation
Conversation
…stalls Guava was on the classpath for notifee. BackgroundSyncWorker consumes the ListenableFuture that WorkManager returns, and the standalone listenablefuture jar provides that one class. With Guava gone, the ProGuard keep for com.google.common goes with it. The keep existed for Truth in the instrumentation APK, which now brings its own Guava because the app no longer ships one. An upgraded install keeps the notification channel of the private migration and the WorkManager jobs notifee enqueued. MainApplication now deletes the channel and cancels the jobs by notifee's two work tags on every start. Each change has a test that failed before it: a JVM test that the rest of Guava is absent from the app classpath, a Jest test over the Gradle and ProGuard files, and a JVM test of the purge through its two hooks. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ava at resolution The purge now runs once per install. MainApplication reads a flag from the notifee_residue SharedPreferences file and writes it after the purge, which removes the NotificationManager and WorkManager calls from every later start. The purge also deletes notifee-core's Room database, notifee_core_database, which the AAR of 202108261754 names. That AAR holds no SharedPreferences of its own. A Gradle task per variant resolves the runtime classpath before preBuild and fails when com.google.guava:guava resolves or listenablefuture is absent. It replaces the Jest test over the Gradle and ProGuard text and the JVM test over the unit-test classpath, which observed proxies for the release artifact. AGENTS.md now states the doc-comment rule in force since 2026-10-02: a bulleted list of side effects and doc-tests, in place of the one sentence rule it carried. The residue test failed to compile before the change and the Gradle check failed with Guava declared beside listenablefuture. Both pass on the committed tree. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
zancas
force-pushed
the
build/notifee-followup
branch
from
November 10, 2026 05:08
47e462b to
e160fe8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the review on #1888. Stacked on
build/uninstall-notifee; the diff shows only this PR once #1888 lands.What changes
android/app/build.gradle.kts:com.google.guava:guavaleaves.com.google.guava:listenablefuture:1.0takes its place, sinceBackgroundSyncWorkerconsumes theListenableFuturethat WorkManager returns and needs that one class on the compile classpath. A task per variant resolves the runtime classpath beforepreBuildand fails when Guava resolves orlistenablefutureis absent.android/app/proguard-rules.pro: thecom.google.common.**keep and itsdontwarnleave. The keep served Google Truth in the instrumentation APK. With no Guava in the app, AGP no longer excludes Guava from the test APK, and Truth brings its own copy.NotifeeResidue.kt, called fromMainApplication.onCreate: runs once per install, gated by a flag in thenotifee_residueSharedPreferences file. It deletes theironwood-migrationnotification channel, cancels every WorkManager job notifee enqueued by its two work tagsapp.notifee.core.NotificationManager.TRIGGERandapp.notifee.core.BlockStateBroadcastReceiver.WORKER, and deletes notifee-core's Room databasenotifee_core_database. The names come from the notifee-core AAR of 202108261754, which holds no SharedPreferences of its own.AGENTS.md: the doc-comment rule now reads as a bulleted list of side effects and doc-tests, the rule in force since 2026-10-02.Tests
Each test failed before its fix and passes after it.
NotifeeResidueTest: the purge removes the channel, the two work tags and the database through its hooks, then marks the ledger. A recorded purge touches nothing.verify<Variant>GuavaAbsent: fails withGuava resolves on the prodRelease runtime classpathwhenguavais declared besidelistenablefuture, and passes without it.Checked
./gradlew :app:testProdReleaseUnitTest,./gradlew buildHealthand./gradlew :app:preProdDebugAndroidTestBuildpass.prodReleaseRuntimeClasspathresolveslistenablefuture:1.0and noguava:guava. AGP constrains the androidTest classpath to the samelistenablefutureversion.Needs CI
The offline device tests build the instrumentation APK and exercise Truth without the keep. The release APK build runs R8 without the
com.google.commonrules.🤖 Generated with Claude Code