quarkus: Quarkus fails with Mapstruct (Kapt + Kotlin)

Describe the bug The kaptKotlin plugin fails after upgrading from 1.0.3Final to 1.0.4Final and newer.

Expected behavior Kapt should generate mappers of the interfaces that have annotated the annotation mapper.

Actual behavior The build failes.

To Reproduce Follow the following steps nothing special.

Steps to reproduce the behavior:

  1. use kotlin("kapt") version "1.4.10" (kotlin gradle-DSL)
  2. implement the newest version of mapstruct:
    implementation("org.mapstruct:mapstruct:1.4.1.Final")
    kapt("org.mapstruct:mapstruct-processor:1.4.1.Final")
  1. Generate a random Mapper

Configuration

# Add your application.properties here, if applicable.
Nothing special here

Screenshots grafik

Additional context In the older Version (1.0.3Final) nothing was wrong and everything worked fine.

Example Project https://github.com/oberstrike/polit-me-quarkus

News

  1. Downgrading from Kotlin 1.4.20 to 1.3.70 didn’t help
  2. Changing the mapstruct version didn’t help

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 2
  • Comments: 31 (8 by maintainers)

Most upvoted comments

This seems to be the fix we’ve all been waiting for.

https://youtrack.jetbrains.com/issue/KT-45545

@glefloch Upgrading Gradle to 6.8.3 worked for me. @micheljung I am using the same version combination as like you. It works now. Thanks Gradle: 6.8.3 Mapstruct: 1.4.2.Final Quarkus: 1.12.0.Final Kotlin: 1.4.31

@dinesh-monickaraj I tried with the latest gradle version (6.8.3) and it looks ok. Can you try with it?

@glefloch Can confirm.

OS: macOS 10.15.7 (Catalina) Gradle: 6.8.3 Java: 11.0.10 Oracle Kotlin: 1.4.30 kapt: 1.4.30 Quarkus: 1.10.2.Final

My error message is essentially the same as what @xmlking posted.

Addendum: I don’t see that error when I comment out the kapt plug-in entry.

Update: Still doesn’t work with kotlin 1.4.10 and Quarkus 1.11.1Final