Skip to content

Commit 62bdee2

Browse files
Konstantin PavlovKonstantin Pavlov
authored andcommitted
Set Java version dynamically and configure Kotlin compiler
Updated Maven configurations to dynamically reference the Java version using `${java.version}`. Added Kotlin compiler settings, including `jvmTarget` alignment with Java version and enabling `javaParameters`. This ensures consistency and better compatibility across builds. Signed-off-by: Konstantin Pavlov <{ID}+{username}@users.noreply.github.com>
1 parent 8607a39 commit 62bdee2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pom.xml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,9 @@
168168
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
169169
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
170170
<java.version>17</java.version>
171-
<maven.compiler.source>17</maven.compiler.source>
172-
<maven.compiler.target>17</maven.compiler.target>
171+
<maven.compiler.source>${java.version}</maven.compiler.source>
172+
<maven.compiler.target>${java.version}</maven.compiler.target>
173+
<kotlin.compiler.jvmTarget>${java.version}</kotlin.compiler.jvmTarget>
173174

174175
<!-- production dependencies -->
175176
<spring-boot.version>3.3.6</spring-boot.version>
@@ -344,6 +345,10 @@
344345
<groupId>org.jetbrains.kotlin</groupId>
345346
<artifactId>kotlin-maven-plugin</artifactId>
346347
<version>${kotlin.version}</version>
348+
<configuration>
349+
<jvmTarget>${java.version}</jvmTarget>
350+
<javaParameters>true</javaParameters>
351+
</configuration>
347352
<executions>
348353
<execution>
349354
<id>compile</id>

0 commit comments

Comments
 (0)