Skip to content

Configure KAPT gradle plugin when an annotation processor is selected #438

Open
@leonard84

Description

@leonard84

The initializr should generate the appropriate entries for KAPT if the language is Kotlin and the ConfigurationProcessor is selected as dependency.

In gradle you just need to add the processor as an dependency to the kapt configuration:
dependencies { kapt "org.springframework.boot:spring-boot-configuration-processor" }
https://stackoverflow.com/questions/37858833/spring-configuration-metadata-json-file-is-not-generated-in-intellij-idea-for-ko

Maven is a bit more verbose https://kotlinlang.org/docs/reference/kapt.html and requires declaration of the kapt goal. However, there is an open issue that prevents kapt from working if a compiler plugin (e.g. kotlin-maven-allopen) is added as dependency https://youtrack.jetbrains.com/issue/KT-18022

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions