Is kapt supported in maven?

前端 未结 1 1990
执笔经年
执笔经年 2021-01-18 16:30

Is it possible to run kapt (kotlin annotation processing) in a maven based project?

If yes how do I integrate kapt in maven build system?

1条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-18 17:29

    Since Kotlin 1.1.2 there is now support for both Gradle and Maven to run the KAPT plugins. This is documented in Using Kotlin annotation processing tool where it says to:

    Add an execution of the kapt goal from kotlin-maven-plugin before compile:

    
        kapt
        
            kapt
        
        
            
                src/main/kotlin
                src/main/java
            
            
                
                
                    com.google.dagger
                    dagger-compiler
                    2.9
                
            
        
    
    

    0 讨论(0)
提交回复
热议问题