Skip to content

feat(kotlin): kapt opt-out and default-stage dedup across modules#921

Merged
dieppa merged 4 commits into
release/1.4from
fix/ksp
Jun 2, 2026
Merged

feat(kotlin): kapt opt-out and default-stage dedup across modules#921
dieppa merged 4 commits into
release/1.4from
fix/ksp

Conversation

@dieppa

@dieppa dieppa commented Jun 2, 2026

Copy link
Copy Markdown
Member
  • feat(kotlin): kapt opt-out and default-stage dedup across modules
  • chore: bump version to 1.4.2

dieppa added 2 commits June 2, 2026 14:00
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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-applying org.jetbrains.kotlin.kapt in 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.

dieppa and others added 2 commits June 2, 2026 14:17
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>
@dieppa dieppa merged commit 693ee0e into release/1.4 Jun 2, 2026
4 checks passed
@dieppa dieppa deleted the fix/ksp branch June 2, 2026 13:36
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