Modern Apps git

← Modern-Apps.git

library: remove downloadservice-to-work edge, use androidx.work (#884)

Commit
07abc4687771d19bdec0acc0cace987363efc46b
Author
Vayun Mathur <[email protected]>
When
2026-10-31 19:25 UTC (1 month ago)
Parents
d6e8a46
:library:downloadservice depended on :library:work, whose only reusable
surface is scheduling that module's own daily-reminder workers — nothing
ModelDownloadWorker uses. It built on androidx.work APIs directly, so the
edge bought nothing and violated the owner's rule against
library-to-library edges (work itself depends on base :library, which
would transitively widen every download consumer's classpath).

The module now depends on androidx.work:work-runtime-ktx from the version
catalog directly, keeping the foreground ModelDownloadWorker behaviour
(exponential-backoff retries, unmetered-network constraint) identical.

User-visible effect: none — download gating and retries behave exactly as
before.

Verification: :library:downloadservice compileDebugKotlin and consumer
:translate compileDevKotlin green in one invocation.

Diff

library/downloadservice/AGENTS.md
diff --git a/library/downloadservice/AGENTS.md b/library/downloadservice/AGENTS.mdindex 7b2af293d6..9cd088353f 100644--- a/library/downloadservice/AGENTS.md+++ b/library/downloadservice/AGENTS.md@@ -6,7 +6,9 @@ - Gradle: :library:downloadservice / dir: library/downloadservice/ - Package roots present: (foreground-download helpers — one package) - Entry files: InitialDownloader.kt (no MainActivity/Route — library)-- Deps: :library, :library:work+- Deps: :library (permission-free edge; WorkManager comes from+  androidx.work directly — the `:library:work` helpers schedule that module's+  own reminders, nothing reusable here, #884) - Metadata: metadata_data/library-downloadservice.md (absent — libraries have none by design) - Rust: no / screenshotTest: no 
library/downloadservice/build.gradle.kts
diff --git a/library/downloadservice/build.gradle.kts b/library/downloadservice/build.gradle.ktsindex a6c6ec6b22..5a5101c892 100644--- a/library/downloadservice/build.gradle.kts+++ b/library/downloadservice/build.gradle.kts@@ -4,6 +4,8 @@ plugins {  dependencies {     implementation(project(":library"))-    // WorkManager: the download runs in ModelDownloadWorker so it outlives the gating screen.-    implementation(project(":library:work"))+    // WorkManager directly: this module's workers use only androidx.work APIs+    // (the :library:work helpers schedule that module's own reminders, nothing+    // reusable here), so no library-to-library edge is needed (#884).+    implementation(libs.androidx.work.runtime.ktx) }