Skip to content

build(abi): drop the duplicate universal ABI flavor - #35

Closed
shiaho777 wants to merge 3 commits into
wangzhishou:mainfrom
shiaho777:build/drop-duplicate-universal-abi-flavor
Closed

shiaho777 wants to merge 3 commits into
wangzhishou:mainfrom
shiaho777:build/drop-duplicate-universal-abi-flavor

Conversation

@shiaho777

@shiaho777 shiaho777 commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

What changed

The abi flavor dimension had two product flavors, arm64 and universal, whose abiFilters were both arm64-v8a — every release pipeline built each APK twice for identical native libraries. The duplicate is removed and the dimension keeps its single arm64 flavor:

  • app/build.gradle.kts and build-logic/convention/.../ImageToolboxLibraryPlugin.kt: the universal flavor block is gone.
  • The "universalApi"(libs.com.tencent.mmkv) dependency configuration disappears with the flavor, so that line is removed from the 23 modules that declared it; "arm64Api" is unchanged. Without this the build fails with Configuration with name 'universalApi' not found.
  • .github/workflows/android.yml: the abi_flavor input, its default and the matrix are arm64-only, so a tag push produces 7 APKs instead of 14.
  • .github/workflows/pr-check.yml: CI assembles :app:assembleFossArm64Debug.
  • build_release.sh: ALL_ABIS=("arm64"), and the artifact collection now Pascal-cases the ABI in the directory it looks in. It was reading app/build/outputs/apk/fossarm64/release while AGP writes fossArm64 — the same casing trap the mapping path further down the script already documents, so the script only resolved APKs on a case-insensitive filesystem.
  • README.md, README.zh-CN.md, run.md, CONTRIBUTING.md, fastlane/README.md, feature/iching-divination/README.md, and two comments in feature/xiangqi/build.gradle.kts: variant names and the "2 ABIs / 14 APKs" statements updated to the arm64-only names.
  • fastlane/push_release.py and scripts/publish_gitcode_release.py: the AAB glob pointed at app/build/outputs/bundle/googleUniversalRelease, a directory that no longer exists after the rename.

How it was verified

  • ./gradlew :app:assembleFossArm64Debug — BUILD SUCCESSFUL, APK written to app/build/outputs/apk/fossArm64/debug/.
  • ./gradlew :app:assembleFossUniversalDebug — fails with task 'assembleFossUniversalDebug' not found in project ':app', so the old variant is gone rather than aliased.
  • ./gradlew :app:assembleFossArm64Debug --dry-run — the full 3820-task graph configures, which is what surfaces bad flavor-scoped configuration names across all modules.
  • build_release.sh: bash -n passes, and the collection expression now expands to app/build/outputs/apk/fossArm64, the directory AGP actually produced.
  • python3 -m py_compile on both edited scripts.

Not verified: signing, the release android.yml job (needs a tag push) and the Play upload path, none of which run without keys.

shiaho777 and others added 3 commits October 7, 2026 08:34
The abi dimension had two flavors, arm64 and universal, whose abiFilters were
both arm64-v8a, so every release pipeline built each APK twice. Remove the
duplicate and keep the single arm64 flavor:

- drop the universal flavor from app and from the library convention plugin
- drop the now non-existent "universalApi" dependency configuration from the
  23 modules that declared MMKV on it; "arm64Api" stays
- make the abi_flavor CI input, matrix and build_release.sh arm64-only
- update the variant names in the docs and release scripts
build_release.sh looked in app/build/outputs/apk/<channel><abi>/release, which
expands to fossarm64 while AGP writes fossArm64 - the same casing trap the
mapping path below already documents. The lookup only resolved on
case-insensitive filesystems.

Also drop the two remaining comments that still described the abi dimension as
having two flavors, and keep the abi_flavor matrix in its array form for the
manual dispatch branch.
@wangzhishou
wangzhishou force-pushed the build/drop-duplicate-universal-abi-flavor branch from f6c30fb to 8197e25 Compare October 7, 2026 00:42
wangzhishou pushed a commit that referenced this pull request Oct 7, 2026
The abi flavor dimension had two flavors (arm64/universal) whose
abiFilters were both arm64-v8a. Drop universal, keep arm64; remove
the per-flavor universalApi mmkv wiring across modules, update CI
matrices, build_release.sh (incl. the APK dir casing fix), fastlane
and GitCode publish scripts, and all variant references in docs.

Co-authored-by: shiaho <222622008+shiaho777@users.noreply.github.com>
@wangzhishou

Copy link
Copy Markdown
Owner

Merged manually as squash commit 3c837c6 (the API merge was blocked by a token scope issue, so I'm closing this by hand — your commits are credited via Co-authored-by).

Two things I did on top of your branch before landing it:

  • Rebased onto current main.
  • Removed one leftover "universalApi"(libs.com.tencent.mmkv) in feature/sudoku/build.gradle.kts — that module landed on main after your branch point, so your diff couldn't have covered it. Without the line removed, configuration fails with Configuration with name 'universalApi' not found.

Verified on the rebased tree: :app:assembleFossArm64Debug --dry-run configures the full graph, and the old assembleFossUniversalDebug task is gone.

Thanks for the cleanup — the halved release matrix is a real win.

@wangzhishou wangzhishou closed this Oct 7, 2026
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.

2 participants