Repository navigation
Adding to your project
Kobting edited this page Sep 23, 2023
·
3 revisions
Note: This uses github packages which requires some setup. Documentation. Or you can just download the jars and add them to your project that way.
<repositories>
<repository>
<id>github</id>
<name>GitHub Kobting STS-Annotations</name>
<url>https://maven.pkg.github.com/kobting/STS-Annotations</url>
<releases><enabled>true</enabled></releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>github</id>
<name>GitHub Kobting STS-Annotations</name>
<url>https://maven.pkg.github.com/kobting/STS-Annotations</url>
<releases><enabled>true</enabled></releases>
</pluginRepository>
</pluginRepositories>
<dependency>
<groupId>com.github.kobting.sts-annotations</groupId>
<artifactId>annotations</artifactId>
<version>0.7.0</version>
</dependency>This is used to add both java and kotlin sources to the project. This generates kotlin code so it is needed.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.12</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>
add-source
</goal>
</goals>
<configuration>
<sources>
<source>src/main/kotlin</source>
<source>src/main/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>This is adding steps to compile kotlin code and enable KSP. This also adds this project and needed dependencies for compiling and running the KSP step.
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>1.7.22</version>
<executions>
<execution>
<id>compile</id>
<phase>process-sources</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<jvmTarget>1.8</jvmTarget>
<compilerPlugins>
<compilerPlugin>ksp</compilerPlugin>
</compilerPlugins>
<pluginOptions>
<option>ksp:apoption=resourceBasePath=${resourceBasePath}</option>
</pluginOptions>
</configuration>
<dependencies>
<dependency>
<groupId>com.megacrit.cardcrawl</groupId>
<artifactId>slaythespire</artifactId>
<version>${SlayTheSpire.version}</version>
<scope>system</scope>
<systemPath>${Steam.path}/common/SlayTheSpire/desktop-1.0.jar</systemPath>
</dependency>
<dependency>
<groupId>com.evacipated.cardcrawl</groupId>
<artifactId>modthespire</artifactId>
<version>${ModTheSpire.version}</version>
<scope>system</scope>
<systemPath>${Steam.path}/workshop/content/646570/1605060445/ModTheSpire.jar</systemPath>
</dependency>
<dependency>
<groupId>basemod</groupId>
<artifactId>basemod</artifactId>
<version>5.29.0</version>
<scope>system</scope>
<systemPath>${Steam.path}/workshop/content/646570/1605833019/BaseMod.jar</systemPath>
</dependency>
<dependency>
<groupId>com.google.devtools.ksp</groupId>
<artifactId>symbol-processing-api</artifactId>
<version>1.7.22-1.0.8</version>
</dependency>
<dependency>
<groupId>com.dyescape</groupId>
<artifactId>kotlin-maven-symbol-processing</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>com.github.kobting.sts-annotations</groupId>
<artifactId>processors</artifactId>
<version>0.7.0</version>
</dependency>
</dependencies>
</plugin>