Skip to content

feat: Integrate KMP Product Flavors v1.0.1#132

Closed
therajanmaurya wants to merge 3 commits intodevfrom
feature/kmp-product-flavors-v1.0.1
Closed

feat: Integrate KMP Product Flavors v1.0.1#132
therajanmaurya wants to merge 3 commits intodevfrom
feature/kmp-product-flavors-v1.0.1

Conversation

@therajanmaurya
Copy link
Member

Summary

Integrates kmp-product-flavors v1.0.1 plugin for cross-platform flavor support in Kotlin Multiplatform projects.

Changes

  • Convention Plugin: KMPFlavorsConventionPlugin.kt - Wraps kmp-product-flavors plugin
  • Flavor Config: org/convention/KmpFlavors.kt - Centralized flavor configuration (demo/prod)
  • Plugin Integration: Applied in both KMPLibraryConventionPlugin and KMPCoreBaseLibraryConventionPlugin
  • Version Catalog: Added kmpProductFlavors = "1.0.1" dependency

Features Enabled

  • Multi-dimensional flavor support (demo/prod)
  • BuildConfig generation per variant
  • Flavor-specific source sets (commonDemo/, commonProd/, etc.)
  • Proper source set dependency wiring (no warnings)

v1.0.1 Fixes

  • Fixed "Invalid Dependency on Default Compilation Source Set" warnings
  • Platform flavor source sets now correctly depend only on commonFlavor
  • Improved convention plugin integration documentation

Test plan

  • Verify build completes without flavor-related warnings
  • Verify ./gradlew listFlavors shows demo/prod variants
  • Verify BuildConfig is generated with correct values

Documentation

🤖 Generated with Claude Code

therajanmaurya and others added 3 commits February 25, 2026 17:12
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>
- Apply kmp.flavors in KMPLibraryConventionPlugin (all KMP modules get flavors)
- Apply kmp.flavors in KMPCoreBaseLibraryConventionPlugin
- Add kmp-flavors-convention to version catalog for direct usage
- Remove mavenLocal (not needed for production - plugin on Maven Central)

All KMP library modules now automatically get cross-platform flavor support
(demo/prod) that aligns with Android application flavors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
v1.0.1 includes:
- Fixed "Invalid Dependency on Default Compilation Source Set" warnings
- Platform flavor source sets now correctly depend only on commonFlavor
- Improved convention plugin integration documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 25, 2026

Warning

Rate limit exceeded

@therajanmaurya has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 0 minutes and 50 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between c4a85c9 and f5c979d.

📒 Files selected for processing (6)
  • build-logic/convention/build.gradle.kts
  • build-logic/convention/src/main/kotlin/KMPCoreBaseLibraryConventionPlugin.kt
  • build-logic/convention/src/main/kotlin/KMPFlavorsConventionPlugin.kt
  • build-logic/convention/src/main/kotlin/KMPLibraryConventionPlugin.kt
  • build-logic/convention/src/main/kotlin/org/convention/KmpFlavors.kt
  • gradle/libs.versions.toml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/kmp-product-flavors-v1.0.1

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@therajanmaurya
Copy link
Member Author

Superseded by PR from fork with build fix for package name generation.

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