Conversation
Integrate kmp-product-flavors (v1.0.0) for cross-platform flavor support that aligns with existing Android application flavors.
## Changes
- Add kmp-product-flavors v1.0.0 to version catalog
- Create KMPFlavorsConventionPlugin for easy integration
- Add KmpFlavors.kt with centralized flavor configuration
- Configure demo/prod flavors matching Android application
- Add mavenLocal() for local development support
## Features
- Cross-platform flavor support (Android, iOS, Desktop, Web)
- BuildConfig generation with flavor-specific constants
- Automatic source set wiring for all platforms
- Aligns with existing Android contentType dimension (demo/prod)
## Usage
Apply to any KMP module:
```kotlin
plugins {
id("org.convention.kmp.flavors")
}
```
Build with specific flavor:
```bash
./gradlew build -PkmpFlavor=prod
```
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update Needed Before MergeThe
Since kmp-product-flavors v1.0.0 is now published to Maven Central and Gradle Plugin Portal, production applications don't need mavenLocal fallback. I attempted to push this fix but the branch protection rules prevented it. Please remove these lines before merging: - mavenLocal() // For local development with kmp-product-flavorsLibrary published to:
|
|
Superseded by new PR with complete convention plugin integration |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
📝 WalkthroughWalkthroughIntroduces KMP Product Flavors support by creating a new Gradle convention plugin (KMPFlavorsConventionPlugin) that configures cross-platform flavor dimensions and flavors with build config generation, alongside flavor configuration infrastructure and repository setup for local development. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
✨ Finishing Touches
🧪 Generate unit tests (beta)
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 |
Summary
Integrate kmp-product-flavors (v1.0.0) for cross-platform flavor support that aligns with existing Android application flavors.
Changes
KMPFlavorsConventionPluginfor easy integrationKmpFlavors.ktwith centralized flavor configurationFeatures
commonDemo,commonProd,iosDemo, etc.Usage
Apply to any KMP module:
plugins { id("org.convention.kmp.flavors") }Build with specific flavor:
List available variants:
Generated BuildConfig
Test plan
./gradlew build -PkmpFlavor=demo./gradlew build -PkmpFlavor=prod./gradlew listFlavorsto verify variant configuration🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes