diff --git a/docs/topics/kapt.md b/docs/topics/kapt.md index a3ade3d5e2c..474142bf2d5 100644 --- a/docs/topics/kapt.md +++ b/docs/topics/kapt.md @@ -78,13 +78,28 @@ Follow these steps: {style="warning"} From Kotlin 1.9.20, you can try using the kapt compiler plugin with the [K2 compiler](https://blog.jetbrains.com/kotlin/2021/10/the-road-to-the-k2-compiler/), -which brings performance improvements and many other benefits. To use the K2 compiler in your project, add the following -options to your `gradle.properties` file: +which brings performance improvements and many other benefits. To use the K2 compiler in your Gradle project, add the following +option to your `gradle.properties` file: ```kotlin kapt.use.k2=true ``` +If you use the Maven build system, update your `pom.xml` file: + +```xml + + ... + + -Xuse-k2-kapt + + +``` + +> To enable the kapt plugin in your Maven project, see [](#use-in-maven). +> +{style="tip"} + If you encounter any issues when using kapt with the K2 compiler, please report them to our [issue tracker](http://kotl.in/issue). @@ -370,6 +385,17 @@ For example: ``` +To enable the kapt plugin with the K2 compiler, add the `-Xuse-k2-kapt` compiler option: + +```xml + + ... + + -Xuse-k2-kapt + + +``` + ## Use in IntelliJ build system kapt is not supported for IntelliJ IDEA's own build system. Launch the build from the "Maven Projects"