-
-
Notifications
You must be signed in to change notification settings - Fork 0
Maven
itsTyrion edited this page Mar 17, 2024
·
2 revisions
Hint: I have no idea how to do the libraries
part with maven, tips or a PR are welcome.
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<dependency>
<groupId>de.itsTyrion</groupId>
<artifactId>PluginAnnotationProcessor</artifactId>
<version>1.4</version>
</dependency>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>17</source>
<target>17</target>
<!-- Pass the project version as an argument to the compiler -->
<compilerArgs>
<arg>-Aproject.version=${project.version}</arg>
</compilerArgs>
</configuration>
</plugin>
</plugins>
</build>
(Copied from the docs)
Add an execution of the kapt goal from kotlin-maven-plugin before compile:
<execution>
<id>kapt</id>
<goals>
<goal>kapt</goal> <!-- You can skip the <goals> element
if you enable extensions for the plugin -->
</goals>
<configuration>
<sourceDirs>
<sourceDir>src/main/kotlin</sourceDir>
<sourceDir>src/main/java</sourceDir>
</sourceDirs>
<annotationProcessorPaths>
<annotationProcessorPath>
<groupId>de.itsTyrion</groupId>
<artifactId>PluginAnnotationProcessor</artifactId>
<version>1.4</version>
</annotationProcessorPath>
</annotationProcessorPaths>
</configuration>
</execution>