Migrate kolibri-installer-android into the Python monorepo
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Migrate kolibri-installer-android from its standalone repo into platforms/android/ as a uv workspace member. It builds an Android APK/AAB via Gradle + Chaquopy (which embeds Python 3.10 into the app), consuming Kolibri as a built wheel/tar — it does not build Kolibri from the workspace, so it takes no kolibri = { workspace = true } dependency.
Installer migration under #13720. Framed "deferred — active dev", pulled forward now because upcoming zeroconf/mDNS work needs coordinated Kolibri core API changes, which co-location makes tractable. Follows the platforms/ pattern established by the server (#14964) and Pi (#14967) migrations.
Complexity: High · Target branch: develop
Context
kolibri-installer-android wraps Kolibri as an Android app. Standalone repo contains:
- Gradle project rooted at repo top level:
settings.gradle,build.gradle,app/,gradlew,gradle/,.idea/— single:appmodule,rootProject.name = "Kolibri". - Chaquopy (
com.chaquo.python) embeds Python 3.10;app/build.gradlepip-installs Kolibri from an extracted tarball (../tar/extracted) plusrequirements.txt(Chaquopy-resolved:cryptography,ifaddr). pyproject.tomlwith host-only tooling (dependencies = []; extras:build=google-api-python-client==2.96.0+google-auth==2.22.0for Play Store publishing,test= pytest,dev= prek); its ownuv.lock,.python-version(3.10).- Version:
app/build.gradlereads Kolibri'sVERSIONforversionName;versionCodefrom the Play Store API (scripts/version.py) for official builds, timestamp-based for dev. - Maestro smoke-test flows (
.maestro/),Makefile,scripts/.
The Change
- Move the repo into
platforms/android/, preserving git history viagit filter-repo --to-subdirectory-filter+merge --allow-unrelated-histories. - Register it as a uv workspace member (shared lockfile), per #14663.
- Bump the stale Play Store publishing pins (
google-api-python-client,google-auth) to align with Kolibri'sgoogle-auth==2.38.0so the shared lockfile resolves. - Keep the Chaquopy embedded runtime (
requirements.txt:cryptography,ifaddr) out of the workspace — Chaquopy resolves it against prebuilt wheels. - Add a make target that stages the workspace-built Kolibri tar into
platforms/android/tar/, replacing the manualmake get-tar tar=<URL>download for local dev. - Repoint the Gradle
buildPythonfrom../.venvto the shared workspace.venv. - Derive
versionNamefrom the Kolibri version, removing the hardcoded installer version. - Migrate
build_apk.yml(the reusable APK builder) asplatform-android-build_apk.yml. - Rewire
pr_build_kolibri.yml's existingapkjob to call the migrated reusable locally, dropping thelearningequality/kolibri-installer-android/…@v0.2.0cross-repo pin and the tar-from-URL download in favour of the workspace-built tar. - Migrate
release_apk.yml(Play Store publish) asplatform-android-release_apk.yml,workflow_dispatchonly. - Drop
build_and_test.yml— its APK build is superseded bypr_build_kolibri.yml'sapkjob. - Fold
build_and_test.yml's Maestrosmoke_testjob intopr_build_kolibri.yml's smoke-test block, besidepi_smoke_test. - Drop
pre-commit.ymlandcall-pull-request-target.yml, collapsing into the monorepo's existing pre-commit and pull-request-target workflows. - Document the Android Studio workflow: open
platforms/android/(not the repo root), which Android Studio maps to the monorepo VCS root above it.
Out of Scope
- Migrating other installers — separate per-repo tasks under #13720.
- Archiving the source repo.
- Building Kolibri from workspace source into the app — a workspace-source fallback for rapid core-dev iteration is a follow-up.
- Behavioural changes to the app or the Play Store publish path — like-for-like migration (dependency bumps allowed where migration requires).
- Reworking the
versionCodemechanism. - Making the APK build/smoke-test blocking — the WHL smoke-test fan-in remains the sole blocking gate.
- Admin/infra setup (Play Store signing keys, service-account credentials) — tracked as admin tasks on #13720.
Acceptance Criteria
Code migration
- [ ] Repo content at
platforms/android/, Gradle project buildable from the subfolder. - [ ] Play Store publishing pins bumped to align with Kolibri's
google-auth==2.38.0. - [ ]
versionNamederives from the Kolibri version, with the hardcoded installer version removed. - [ ] Passes monorepo pre-commit without per-file ignores.
- [ ] History +
git blamepreserved viagit filter-repo.
Workspace integration
- [ ] uv workspace member; included by
uv sync --group dev --all-packages. - [ ] Shared lockfile resolves with no
google-*version conflict. - [ ] Chaquopy embedded runtime stays Chaquopy-resolved, out of the workspace lock.
Developer experience
- [ ]
platforms/android/opens as a project in Android Studio with VCS mapped to the monorepo root. - [ ] A make target stages the workspace-built Kolibri tar into
platforms/android/tar/. - [ ] A clean build produces an APK embedding the workspace Kolibri with no download.
- [ ] Gradle
buildPythonresolves to the shared workspace.venv.
Build / validation CI
- [ ]
pr_build_kolibri.yml'sapkjob calls the migratedplatform-android-build_apk.ymllocally, using the workspace-built tar. - [ ] The Maestro smoke test runs in
pr_build_kolibri.yml's smoke-test block on every Kolibri PR. - [ ] Duplicated PR scaffolding (pre-commit, pull-request-target) collapsed into existing monorepo workflows.
Publish / release pipeline
- [ ]
platform-android-release_apk.ymlruns from the monorepo (workflow_dispatch), publishing to the Play Store as before.
Runtime
- [ ] The APK built from
platforms/android/installs and runs Kolibri on-device as before.
References
- Source repository: https://github.com/learningequality/kolibri-installer-android
- Chaquopy (Gradle Python SDK): https://chaquo.com/chaquopy/doc/current/
- uv workspaces: https://docs.astral.sh/uv/concepts/projects/workspaces/
AI usage
Used Claude Code to draft this issue from the migration-framework design; I drove scope and decisions. Claude read the source repo's workflows, build.gradle, and pyproject.toml to ground the CI/build details, checked the Google-libs pin against Kolibri's lockfile, and verified them against the monorepo's conventions.
Which do you want?
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
- Implemented code following the pre-approved plan using test-driven development (red-green-refactor)
- Ran the project's full test suite and linter before committing
- For UI changes: captured live screenshots to verify rendering
- For backend changes: verified with example API/CLI output
The bot has been waiting for a response for 2 hour(s). It will resume automatically when someone replies.
The bot has been waiting for a response for 2 hour(s). It will resume automatically when someone replies.
The bot has been waiting for a response for 2 hour(s). It will resume automatically when someone replies.