Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions controller/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,10 @@ preBuild.dependsOn refreshMapsSizes
// tools/build_kiwix_catalog.py. Unlike the size tasks above it does NOT run on every build
// (the listings are large and the servers throttle bots) — it runs automatically only when
// assembling a RELEASE, and can be invoked manually any time: ./gradlew refreshKiwixCatalog.
// ADFA-5094: unlike Kolibri, Kiwix is NOT yet pulled from Cloudflare on-device (KiwixCatalog is
// not overlay-aware — that is Kiwix's phase 2), so release regeneration stays here as its only
// on-device freshness path until the runtime pull ships. The weekly workflow already publishes
// the Kiwix catalog to Cloudflare so phase 2 has something to consume.
// Never fails the build: if python3 is missing or the fetch is blocked, the committed CSV
// (last known) is kept.
task refreshKiwixCatalog {
Expand All @@ -726,16 +730,18 @@ tasks.matching { it.name == 'assembleRelease' || it.name == 'bundleRelease' }.co
dependsOn refreshKiwixCatalog
}

// ---- Kolibri channel catalog refresh (release-only) ---------------------------
// ---- Kolibri channel catalog refresh (manual only) ----------------------------
// Regenerates src/main/assets/kolibri_catalog.jsonl from Kolibri Studio's public API via
// tools/build_kolibri_catalog.py. Bundled rather than fetched on-device because Studio's
// channel endpoint is 97% base64 thumbnails with no way to opt out — 4.1 MB to use 119 KB
// (ADR-4954 D1). Release-only, like the Kiwix catalog above, and never fails the build:
// on any error the committed JSONL (last known) is kept.
// Manual run: ./gradlew refreshKolibriCatalog
// (ADR-4954 D1). ADFA-5094: this no longer runs on release builds — the weekly publish-catalogs
// workflow generates the catalog off-device (Studio hit once a week, not per build) and the app
// pulls it from Cloudflare at runtime. The bundled JSONL is the offline floor; run this by hand
// only when you want to refresh that floor: ./gradlew refreshKolibriCatalog. Never fails the
// build: on any error the committed JSONL (last known) is kept.
task refreshKolibriCatalog {
group = 'build setup'
description = 'Regenerate assets/kolibri_catalog.jsonl from Kolibri Studio (release / manual)'
description = 'Regenerate assets/kolibri_catalog.jsonl from Kolibri Studio (manual)'
doLast {
try {
def proc = ['python3', 'tools/build_kolibri_catalog.py'].execute(null, projectDir)
Expand All @@ -747,6 +753,3 @@ task refreshKolibriCatalog {
}
}
}
tasks.matching { it.name == 'assembleRelease' || it.name == 'bundleRelease' }.configureEach {
dependsOn refreshKolibriCatalog
}
30 changes: 15 additions & 15 deletions controller/docs/operation-model-roadmap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading