🏗 Add Kotlin plugin
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 31 May 2020 12:40:07 +0000 (14:40 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 31 May 2020 14:45:11 +0000 (16:45 +0200)
pom.xml

diff --git a/pom.xml b/pom.xml
index b8d8ab1..0933bc7 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                        <artifactId>log4j</artifactId>
                        <version>1.2.17</version>
                </dependency>
+               <dependency>
+                       <groupId>org.jetbrains.kotlin</groupId>
+                       <artifactId>kotlin-stdlib-jdk8</artifactId>
+                       <version>${kotlin.version}</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.jetbrains.kotlin</groupId>
+                       <artifactId>kotlin-test-junit</artifactId>
+                       <version>${kotlin.version}</version>
+                       <scope>test</scope>
+               </dependency>
        </dependencies>
 
        <properties>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+               <kotlin.version>1.3.72</kotlin.version>
        </properties>
 
        <build>
                <plugins>
                        <plugin>
+                               <groupId>org.jetbrains.kotlin</groupId>
+                               <artifactId>kotlin-maven-plugin</artifactId>
+                               <version>${kotlin.version}</version>
+                               <executions>
+                                       <execution>
+                                               <id>compile</id>
+                                               <phase>process-sources</phase>
+                                               <goals>
+                                                       <goal>compile</goal>
+                                               </goals>
+                                       </execution>
+                                       <execution>
+                                               <id>test-compile</id>
+                                               <phase>test-compile</phase>
+                                               <goals>
+                                                       <goal>test-compile</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                               <configuration>
+                                       <jvmTarget>1.8</jvmTarget>
+                               </configuration>
+                       </plugin>
+                       <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-compiler-plugin</artifactId>
                                <version>2.0.2</version>
+                               <executions>
+                                       <execution>
+                                               <id>compile</id>
+                                               <phase>compile</phase>
+                                               <goals>
+                                                       <goal>compile</goal>
+                                               </goals>
+                                       </execution>
+                                       <execution>
+                                               <id>testCompile</id>
+                                               <phase>test-compile</phase>
+                                               <goals>
+                                                       <goal>testCompile</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
                                <configuration>
                                        <source>1.8</source>
                                        <target>1.8</target>