feat(kotlin): kapt opt-out and default-stage dedup across modules#921
Merged
Conversation
dieppa
commented
Jun 2, 2026
Member
- feat(kotlin): kapt opt-out and default-stage dedup across modules
- chore: bump version to 1.4.2
Address the two Kotlin-support follow-ups captured after the #918 fix in KOTLIN_SUPPORT_FOLLOWUPS.md. * Kapt auto-apply opt-out via `flamingock.autoApplyKapt` Gradle property (default true; opt out with literal case-insensitive `false`). Gradle property, not DSL: the `plugins { }` block evaluates before `flamingock { }`, so a DSL setter would fire too late. * Mixed Java+Kotlin modules no longer produce duplicate default-stage entries in the composite pipeline. `MetadataLoader.CompositePipelineBuilder` now applies the same id-deduplicated same-name collapse to default stages that legacy stages already used. Identity-field mismatches still WARN for default stages so genuine misconfigurations stay visible.
There was a problem hiding this comment.
Pull request overview
This PR updates Flamingock’s Gradle plugin and core metadata aggregation to improve Kotlin support and mixed Java+Kotlin module behavior, and bumps the overall project version to 1.4.2-SNAPSHOT.
Changes:
- Add a Gradle property (
flamingock.autoApplyKapt) to opt out of auto-applyingorg.jetbrains.kotlin.kaptin Kotlin JVM projects. - Collapse same-name default stages across modules (similar to existing legacy-stage behavior) while preserving a WARN on identity mismatches for default stages.
- Add/extend unit tests and update internal follow-up documentation; bump version to
1.4.2-SNAPSHOT.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
flamingock-gradle-plugin/src/test/kotlin/io/flamingock/gradle/FlamingockPluginTest.kt |
Adds unit tests for the kapt auto-apply opt-out helper behavior. |
flamingock-gradle-plugin/src/main/kotlin/io/flamingock/gradle/internal/FlamingockConstants.kt |
Introduces the flamingock.autoApplyKapt property constant with documentation. |
flamingock-gradle-plugin/src/main/kotlin/io/flamingock/gradle/FlamingockPlugin.kt |
Implements kapt opt-out logic and wires it into Kotlin JVM plugin detection. |
flamingock-gradle-plugin/docs/KOTLIN_SUPPORT_FOLLOWUPS.md |
Updates status notes to reflect implemented items in 1.4.2 and remaining KSP work. |
core/flamingock-core-commons/src/test/java/io/flamingock/internal/common/core/metadata/CompositePipelineBuilderTest.java |
Adds tests covering default-stage collapse/dedup and regression guards. |
core/flamingock-core-commons/src/main/java/io/flamingock/internal/common/core/metadata/MetadataLoader.java |
Generalizes stage collapse logic to include default stages and adds mismatch WARN behavior. |
build.gradle.kts |
Bumps declared snapshot version to 1.4.2-SNAPSHOT. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.