spring-projects / spring-projects/spring-modulith

KAPT Fails with Spring Modulith 1.3.0 in Kotlin Project

Open
#982 11 comments 0 reactions 1 assignee View on GitHub

@odrotbohm is already working on this.

Since Dec 10, 2024.

meta: waiting for feedback
Dominant language
Java
Stars
1.2k
Forks
222
PR merge metrics
No merged PRs in 30d

Description

Issue Description:
Upgrading spring-modulith from 1.2.4 to 1.3.0 causes the KAPT task to fail in a Kotlin project using MapStruct. Error message:

Execution failed for task ':kaptKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptWithoutKotlincTask$KaptExecutionWorkAction

The issue occurs with Spring Boot 3.3.6 and 3.4.0. Downgrading to spring-modulith to 1.2.4 resolves the problem.

Steps to Reproduce:

  1. Run the included project with Gradle build (./gradlew build) with Spring Modulith 1.3.0.

Expected Behavior:
The build should complete successfully.

Actual Behavior:
The build fails with the error during the KAPT task.


Seeing as this was not a problem in 1.2.4, I don't think its a MapStruct or KAPT issue (though KAPT is quirky).
Demo project is attached for reference.
demo_spring_modulith_kotlin_kapt.zip

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.