How to specify the annotations dir when using ant or maven?


#1

Since kotlinc-jvm supports -annotations argument, how can I do the same with ant or maven ? Thanks.

Outersky


#2

With Maven you can use annotationPaths setting for the Kotlin-plugin:

``

<plugin>
  <artifactId>kotlin-maven-plugin</artifactId>
  <groupId>org.jetbrains.kotlin</groupId>
  <version>${kotlin.version}</version>
  
  <configuration>
  <annotationPaths>
           <annotationPath>annotations</annotationPath>
  </annotationPaths>
  </configuration>

  …
</plugin>