-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #100 from kghackers/feat/#81_migrate-to-kotlin
feat: #81 Migrate project to Kotlin (started the migration) feat: #102 Extract `kgCommon` module, turn off the legacy modules by default (you can enable them via a special maven profile). feat: #101 Kefir usage reduced, only left in the legacy modules.
- Loading branch information
Showing
121 changed files
with
2,802 additions
and
1,936 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,227 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>ru.klavogonki.kgparser</groupId> | ||
<artifactId>kgparser</artifactId> | ||
<version>1.0</version> | ||
</parent> | ||
|
||
<artifactId>kg-common</artifactId> | ||
<name>kg-common</name> | ||
<description>Common module with basic Klavogonki classes, uses by both legacy kgparser and kgstats.</description> | ||
|
||
<!-- build as a trivial jar file --> | ||
<packaging>jar</packaging> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.assertj</groupId> | ||
<artifactId>assertj-core</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-core</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-annotations</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-api</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.junit.jupiter</groupId> | ||
<artifactId>junit-jupiter-engine</artifactId> | ||
</dependency> | ||
|
||
<!-- mapstruct --> | ||
<dependency> | ||
<groupId>org.mapstruct</groupId> | ||
<artifactId>mapstruct</artifactId> | ||
</dependency> | ||
|
||
<!-- 1 generator --> | ||
<dependency> | ||
<groupId>org.openapitools</groupId> | ||
<artifactId>jackson-databind-nullable</artifactId> | ||
<version>${jackson-databind-nullable-version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.swagger</groupId> | ||
<artifactId>swagger-annotations</artifactId> | ||
<version>${swagger-annotations-version}</version> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
|
||
<!-- see https://kotlinlang.org/docs/maven.html#compile-kotlin-and-java-sources --> | ||
<!-- see https://kotlinlang.org/docs/lombok.html#maven --> | ||
<plugin> | ||
<groupId>org.jetbrains.kotlin</groupId> | ||
<artifactId>kotlin-maven-plugin</artifactId> | ||
<version>${kotlin.version}</version> | ||
<extensions>true</extensions> <!-- You can set this option to automatically take information about lifecycles --> | ||
|
||
<executions> | ||
<execution> | ||
<id>compile</id> | ||
<goals> | ||
<goal>compile</goal> <!-- You can skip the <goals> element if you enable extensions for the plugin --> | ||
</goals> | ||
<configuration> | ||
<sourceDirs> | ||
<sourceDir>${project.basedir}/src/main/kotlin</sourceDir> | ||
<sourceDir>${project.basedir}/src/main/java</sourceDir> | ||
</sourceDirs> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>test-compile</id> | ||
<goals> | ||
<goal>test-compile</goal> <!-- You can skip the <goals> element if you enable extensions for the plugin --> | ||
</goals> | ||
<configuration> | ||
<sourceDirs> | ||
<sourceDir>${project.basedir}/src/test/kotlin</sourceDir> | ||
<sourceDir>${project.basedir}/src/test/java</sourceDir> | ||
</sourceDirs> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
|
||
<!-- Enable use Lombok-generated code from Java classes in Kotlin --> | ||
<!-- see https://github.com/kotlin-hands-on/kotlin-lombok-examples/blob/master/kotlin_lombok_maven/nokapt/pom.xml --> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.jetbrains.kotlin</groupId> | ||
<artifactId>kotlin-maven-lombok</artifactId> | ||
<version>${kotlin.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>${maven-compiler-plugin.version}</version> | ||
<executions> | ||
<!-- Replacing default-compile as it is treated specially by Maven --> | ||
<execution> | ||
<id>default-compile</id> | ||
<phase>none</phase> | ||
</execution> | ||
<!-- Replacing default-testCompile as it is treated specially by Maven --> | ||
<execution> | ||
<id>default-testCompile</id> | ||
<phase>none</phase> | ||
</execution> | ||
<execution> | ||
<id>java-compile</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>compile</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>java-test-compile</id> | ||
<phase>test-compile</phase> | ||
<goals> | ||
<goal>testCompile</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
|
||
<!-- MapStruct and Lombok configuration --> | ||
<configuration> | ||
<source>${java.version}</source> | ||
<target>${java.version}</target> | ||
<annotationProcessorPaths> | ||
<path> | ||
<groupId>org.mapstruct</groupId> | ||
<artifactId>mapstruct-processor</artifactId> | ||
<version>${org.mapstruct.version}</version> | ||
</path> | ||
<path> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
<version>${lombok.version}</version> | ||
</path> | ||
|
||
<!-- This is needed when using Lombok 1.8.16 and above --> | ||
<!-- see https://mapstruct.org/faq/#can-i-use-mapstruct-together-with-project-lombok --> | ||
<path> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok-mapstruct-binding</artifactId> | ||
<version>${lombok-mapstruct-binding.version}</version> | ||
</path> | ||
|
||
</annotationProcessorPaths> | ||
</configuration> | ||
|
||
</plugin> | ||
|
||
<!-- add sources generated by OpenAPI Generator to jar --> | ||
<!-- see http://www.jeeatwork.com/?p=166 --> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>build-helper-maven-plugin</artifactId> | ||
<version>${build-helper-maven-plugin.version}</version> | ||
<executions> | ||
<execution> | ||
<id>add-source</id> | ||
<phase>generate-sources</phase> | ||
<goals> | ||
<goal>add-source</goal> | ||
</goals> | ||
<configuration> | ||
<sources> | ||
<source>${project.build.directory}/generated-sources/openapi/src</source> | ||
</sources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.assertj</groupId> | ||
<artifactId>assertj-assertions-generator-maven-plugin</artifactId> | ||
<version>${assertj-assertions-generator-maven-plugin.version}</version> | ||
<configuration> | ||
<packages> | ||
<param>ru.klavogonki.statistics.entity</param> | ||
<param>ru.klavogonki.statistics.dto</param> | ||
<param>ru.klavogonki.openapi.model</param> | ||
</packages> | ||
|
||
<entryPointClassPackage>ru.klavogonki.statistics</entryPointClassPackage> | ||
<hierarchical>true</hierarchical> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>generate-assertions</goal> | ||
</goals> | ||
<phase>generate-test-resources</phase> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
</plugins> | ||
</build> | ||
|
||
</project> |
Oops, something went wrong.