Skip to content

Commit 10bd9c5

Browse files
committed
Use Kotlin configuration from Spring Cloud Build
1 parent 83f8da2 commit 10bd9c5

File tree

2 files changed

+6
-58
lines changed

2 files changed

+6
-58
lines changed

pom.xml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
<exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
6969
<flatten-maven-plugin.version>1.5.0</flatten-maven-plugin.version>
7070

71-
<contract.kotlin.version>1.8.22</contract.kotlin.version>
7271
<commons-beanutils.version>1.9.4</commons-beanutils.version>
7372
<sisu-inject-plexus.version>2.6.0</sisu-inject-plexus.version>
7473

@@ -435,28 +434,10 @@
435434
<artifactId>xercesImpl</artifactId>
436435
<version>${xerces.version}</version>
437436
</dependency>
438-
<!-- Kotlin versions aligned with Gradle -->
439-
<dependency>
440-
<groupId>org.jetbrains.kotlin</groupId>
441-
<artifactId>kotlin-bom</artifactId>
442-
<version>${contract.kotlin.version}</version>
443-
<scope>import</scope>
444-
<type>pom</type>
445-
</dependency>
446437
<dependency>
447438
<groupId>org.jetbrains.kotlin</groupId>
448439
<artifactId>kotlin-scripting-compiler-embeddable</artifactId>
449-
<version>${contract.kotlin.version}</version>
450-
</dependency>
451-
<dependency>
452-
<groupId>org.jetbrains.kotlin</groupId>
453-
<artifactId>kotlin-daemon-embeddable</artifactId>
454-
<version>${contract.kotlin.version}</version>
455-
</dependency>
456-
<dependency>
457-
<groupId>org.jetbrains.kotlin</groupId>
458-
<artifactId>kotlin-compiler-embeddable</artifactId>
459-
<version>${contract.kotlin.version}</version>
440+
<version>${kotlin.version}</version>
460441
</dependency>
461442

462443
<!-- Ensure that we don't have 2 sets of slf4j on the classpath -->

specs/spring-cloud-contract-spec-kotlin/pom.xml

Lines changed: 5 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@
4242
<groupId>org.jetbrains.kotlin</groupId>
4343
<artifactId>kotlin-scripting-compiler-embeddable</artifactId>
4444
</dependency>
45-
<dependency>
46-
<groupId>org.jetbrains.kotlin</groupId>
47-
<artifactId>kotlin-script-util</artifactId>
48-
</dependency>
4945
<dependency>
5046
<groupId>org.springframework.boot</groupId>
5147
<artifactId>spring-boot-starter-test</artifactId>
@@ -62,44 +58,15 @@
6258
<testSourceDirectory>src/test/kotlin</testSourceDirectory>
6359
<plugins>
6460
<plugin>
65-
<!-- Based on instructions here - https://kotlinlang.org/docs/reference/using-maven.html -->
61+
<!-- Version and base configuration inherited from spring-cloud-build parent -->
6662
<artifactId>kotlin-maven-plugin</artifactId>
67-
<version>${contract.kotlin.version}</version>
6863
<groupId>org.jetbrains.kotlin</groupId>
6964
<configuration>
70-
<jvmTarget>17</jvmTarget>
65+
<args combine.children="append">
66+
<arg>-Xjvm-default=all</arg>
67+
<arg>-Xbackend-threads=0</arg>
68+
</args>
7169
</configuration>
72-
<executions>
73-
<execution>
74-
<id>compile</id>
75-
<phase>compile</phase>
76-
<goals>
77-
<goal>compile</goal>
78-
</goals>
79-
<configuration>
80-
<args>
81-
<arg>-Xjvm-default=all</arg>
82-
<arg>-Xbackend-threads=0</arg>
83-
</args>
84-
<javaParameters>true</javaParameters>
85-
<sourceDirs>
86-
<sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
87-
</sourceDirs>
88-
</configuration>
89-
</execution>
90-
<execution>
91-
<id>test-compile</id>
92-
<phase>test-compile</phase>
93-
<goals>
94-
<goal>test-compile</goal>
95-
</goals>
96-
<configuration>
97-
<sourceDirs>
98-
<sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
99-
</sourceDirs>
100-
</configuration>
101-
</execution>
102-
</executions>
10370
</plugin>
10471
<plugin>
10572
<groupId>org.jetbrains.dokka</groupId>

0 commit comments

Comments
 (0)