Skip to content

Drive Android ABI list from python-build manifest's android_abis#213

Merged
FeodorFitsner merged 1 commit into
mainfrom
android-abis
Jun 18, 2026
Merged

Drive Android ABI list from python-build manifest's android_abis#213
FeodorFitsner merged 1 commit into
mainfrom
android-abis

Conversation

@FeodorFitsner

Copy link
Copy Markdown
Contributor

Summary

  • Replaces the hardcoded if (pythonVersion == "3.12") listOf(3 ABIs) else listOf(2) branch in serious_python_android/android/build.gradle.kts with a read of <short>.android_abis from python_versions.properties. Drives both defaultConfig.ndk.abiFilters and the per-ABI download/copy fan-out.
  • gen_version_tables emits a List<String> androidAbis field on the generated PythonRelease and one <short>.android_abis=<csv> line per minor in each native package's python_versions.properties (Android / Darwin / Linux / Windows).
  • package_command.dart forwards androidAbis from baseRelease to the per-run PythonRelease.
  • Pinned pythonReleaseDate bumped 2026061420260618 (the python-build release that introduced android_abis, flet-dev/python-build#21).

Why

3.12 carries ["arm64-v8a", "x86_64", "armeabi-v7a"]; 3.13+ are 64-bit-only (PEP 738). Encoded once in python-build's manifest.json so a future minor's ABI matrix is a one-line edit there — no Gradle / Dart change here, no copy in flet's CLI.

Test plan

  • dart run serious_python:gen_version_tables against the pinned 20260618 release is a no-op (snapshot matches what's committed).
  • dart analyze clean on touched files.
  • CI: drift guard (gen_version_tables + git diff --exit-code) passes against the live 20260618 release.
  • CI: Android plugin builds; the per-ABI loop in build.gradle.kts enumerates 3 ABIs for SERIOUS_PYTHON_VERSION=3.12 and 2 for 3.13 / 3.14.

Snapshot from python-build release 20260618, which adds `android_abis` on
each `pythons.<short>` entry. Replaces the hardcoded
`if pythonVersion == "3.12" then 3 ABIs else 2 ABIs` branch in
`serious_python_android/android/build.gradle.kts` with a read of
`<short>.android_abis` from `python_versions.properties` (drives both
`defaultConfig.ndk.abiFilters` and the per-ABI download/copy fan-out).

- `gen_version_tables` emits `androidAbis: List<String>` on the generated
  `PythonRelease` class and one `<short>.android_abis=<csv>` line per
  minor in each native package's `python_versions.properties`.
- `package_command.dart` forwards `androidAbis` from `baseRelease` to the
  per-run `PythonRelease` it constructs.
- Pinned release bumped 20260614 -> 20260618.

Adding a future minor (or flipping a 32-bit support decision) is now a
one-line manifest edit in python-build — no Gradle / Dart change here.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@FeodorFitsner FeodorFitsner merged commit 71960b7 into main Jun 18, 2026
48 of 61 checks passed
@FeodorFitsner FeodorFitsner deleted the android-abis branch June 18, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant