chore(deps): full v2.7.0 adoption — Tier 2 record + drift gate + version pin + Gradle 9.5.1
Summary
End-to-end consumer-side adoption of kmp-product-flavors v2.7.0 (Maven Central + Gradle Plugin Portal, published 2026-06-02 — AGP 9.2.1 + Kotlin 2.3.21 + 100% coverage on the flavor-plugin module).
Bundles two coordinated changes into one PR — the Tier 2 source-of-truth record + the version bumps it documents.
1. Tier 2 adoption record (canonical reference)
docs/ADOPTION_KMP_PRODUCT_FLAVORS.md— first-party reference adoption realizing the abstract Tier 1 spec (librarydocs/adoption/v2.7/consumer.md) against this template's actual paths + outputs. Includes files inventory (KMPFlavorsConventionPlugin.kt+AppFlavor.kt+LocalFlavorsLoader.kt), §1–§14 verify gates, per-version section (v2.7.0 seeded), "downstream forks own onlyLocalFlavors.kt" contract clarification, and "how future bumps work" 8-step recipe.scripts/adoption-doc-verify.py— local drift-gate runner. Parses every### ✅ Verifyblock from the record and reports PASS/FAIL. Baseline: 14/14 PASS. Script-only (no CI surface) — contributor-side correctness check, not a merge blocker.
2. Version bumps (the adoption itself)
gradle/libs.versions.toml—kmpProductFlavors2.4.2 → 2.7.0gradle/wrapper/gradle-wrapper.properties— Gradle 9.5.0 → 9.5.1 (SHA256bafc141b619ad6350fd975fc903156dd5c151998cc8b058e8c1044ab5f7b031f)
Audit
Verified using the library's /lib-sync audit tool against the Tier 1 spec:
| Phase | PASS | AUTO_FIX | MANUAL | SKIP |
|---|---|---|---|---|
| Pre-bump | 13 | 0 | 0 | 2 |
| Post-bump | 13 | 0 | 0 | 2 |
SKIPs are correct:
- §4a (direct-apply pattern, 3a) — n/a; this template uses 3b convention plugin
- §12 (AGP 9.x landmine checks) — conditional; AGP 9.2.1 already verified by §13 end-to-end smoke test
Why this approach
Single source of truth per tier — this Tier 2 record IS the audit trail for the template's adoption. The library's Tier 1 spec gives the abstract contract; this record realizes it concretely; downstream forks (mifos-mobile, mifos-pay, mifos-x-field-officer-app) inherit this whole file via sync-dirs.sh and tweak only their LocalFlavors.kt.
Three-tier chain: [library consumer.md] → [this record] → [downstream forks' LocalFlavors.kt].
v2.7.0 preserves the v2.6 DSL surface byte-identically. Zero source changes required in KMPFlavorsConventionPlugin or AppFlavor.kt. The library's migration doc confirms: "You do not need to migrate."
Related
- Library v2.7.0 release: MobileByteLabs/kmp-product-flavors#118 (merged 2026-06-03)
- Supersedes closed #186 (docs-only), #187 (bump-only), and #188 (admin-direct topology) — consolidated here as fork→upstream
Test plan
- [ ] CI green (Android / Desktop / Web / iOS builds + Static Analysis)
- [ ]
python3 scripts/adoption-doc-verify.py docs/ADOPTION_KMP_PRODUCT_FLAVORS.md→ 14/14 PASS - [ ]
./gradlew :validateFlavors :listFlavors :generateFlavorBuildConfig→ BUILD SUCCESSFUL (§13 smoke test) - [ ] Confirm no DSL changes leaked into
KMPFlavorsConventionPlugin.ktorAppFlavor.kt
Summary by CodeRabbit
-
Chores
- Bumped kmp-product-flavors to 2.8.1
- Upgraded Gradle wrapper to 9.5.1
- Added an adoption verification CLI to detect doc drift
-
New Features
- iOS: per-flavor build configurations, generated xcconfig files, and Xcode schemes for demo/prod variants
- Android: added a staging build type and flavor-aware build behavior
- Desktop/Web: flavor-aware app titles and bundle IDs
-
Refactor
- Simplified flavor/build-type handling and introduced a local flavors extension for overrides
-
Documentation
- Expanded adoption record with integration steps and verify gates
📝 Walkthrough
Walkthrough
Adds a Tier‑2 adoption record for kmp-product-flavors (v2.8.1), a verification CLI to run document verify blocks, bumps the version catalog and Gradle wrapper, extends the convention plugin with an iOS xcconfig generator and LocalFlavors hook, updates desktop/web/Android builds to be flavor-aware, and wires per-flavor iOS xcconfig files, pbxproj build configurations, and schemes.
Changes
kmp-product-flavors Adoption Record and Verification
| Layer / File(s) | Summary |
|---|---|
Adoption record and version entry docs/ADOPTION_KMP_PRODUCT_FLAVORS.md |
Adds the Tier‑2 adoption record, documents v2.8.1 (current) with delta-focused verify gates, records template cleanups (removed legacy files/refs), and retains the comprehensive v2.7.0 §1–§14 verify gates and procedures. |
Drift-gate verification script scripts/adoption-doc-verify.py |
Implements a CLI that extracts fenced bash verify blocks from adoption docs, optionally skips marked blocks, executes them with bash -c in a configurable --cwd, captures output, aggregates PASS/FAIL with truncation, prints summaries, and exits with codes 0/1/2. |
Build dependency pins gradle/libs.versions.toml, gradle/wrapper/gradle-wrapper.properties |
Bumps kmpProductFlavors reference to 2.8.1 and upgrades the Gradle wrapper to 9.5.1 with updated checksum. |
KMP convention plugin & iOS generator build-logic/convention/src/main/kotlin/KMPFlavorsConventionPlugin.kt, build-logic/convention/src/main/kotlin/GenerateIosFlavorXcconfigsTask.kt |
Reworks AGP bridge comments/imports to rely on AgpProductFlavorRegistrar, extends demo flavor suffixes, and registers a new GenerateIosFlavorXcconfigsTask whose outputs are wired as dependencies of iOS framework/link tasks. |
SyncFork and LocalFlavors hook build-logic/convention/src/main/kotlin/SyncForkConfigPlugin.kt, build-logic/convention/src/main/kotlin/local/LocalFlavors.kt |
Clarifies sync-fork iOS identity ownership and adds local.LocalFlavors consumer entry point (documented example, empty apply hook) for downstream forks to register local flavors. |
Android buildTypes cleanup cmp-android/build.gradle.kts |
Removes reliance on removed AppBuildType, adds a staging build type, and simplifies release wiring so the flavor plugin is the single API for flavor/build-type lifecycle settings. |
Desktop & Web flavor integration cmp-desktop/build.gradle.kts, cmp-web/build.gradle.kts |
Apply kmp.flavors.convention, resolve active flavor via -PkmpFlavor/DSL default, derive flavor-specific title and bundle id, and propagate into JVM args, packaging, and resource tokens (APP_DISPLAY_NAME). |
iOS per-flavor Xcode wiring cmp-ios/Configs/iOSApp.xcconfig, cmp-ios/Configs/*.xcconfig, cmp-ios/iosApp.xcodeproj/* |
Adds umbrella iOSApp.xcconfig include, generates per-variant demo*/prod* .xcconfig files with KMPF_VARIANT/bundle/team mappings, registers iOSApp.xcconfig and Configs group in project.pbxproj, expands project and target build configurations to six demo*/prod* entries (adjusting FRAMEWORK_SEARCH_PATHS), and adds shared schemes for each variant. |
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
- openMF/kmp-project-template#171: Prior updates to KMP flavors convention and AGP flavor-bridging (related area and earlier version work).
- openMF/kmp-project-template#157: Prior bump to the
kmpProductFlavorsversion in the version catalog. - openMF/kmp-project-template#141: Related convention-plugin integration and LocalFlavorsLoader extension hook work.
Poem
🐰 I bumped the pin and wrote a guide so clear,
a script to check the gates and flags we cheer,
Gradle, desktop, web and Xcode now align,
flavors bloom per target, every build-time fine—
a tidy hop, the template's spring is here!
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | ⚠️ Warning | Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. | Write docstrings for the functions missing them to satisfy the coverage threshold. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | The title accurately summarizes the main changes: adopting kmp-product-flavors v2.7.0, adding adoption documentation (Tier 2 record), implementing a drift gate, and updating Gradle to 9.5.1. |
| Linked Issues check | ✅ Passed | The PR fully addresses #186 objectives: adds docs/ADOPTION_KMP_PRODUCT_FLAVORS.md as Tier 2 record, implements scripts/adoption-doc-verify.py as drift gate, updates kmp-product-flavors to v2.7.0, and includes all §1–§14 verify gates with platform support. |
| Out of Scope Changes check | ✅ Passed | The PR includes additional changes beyond #186's scope: Gradle 9.5.1 update, removal of AppFlavor.kt/AppBuildType.kt, iOS xcconfig generation, and desktop/web flavor support. However, these align with the v2.7.0 adoption stated in PR objectives and support the adoption record's completeness. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
- [ ] Create PR with unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands and usage tips.