From 9718de0b43aa54879ee1d2e0bfb593809945c4c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20Guill=C3=A9n?= Date: Thu, 5 Sep 2024 18:49:11 +0200 Subject: [PATCH] Upgrade kotlin to version 2.0.0 --- .github/workflows/build.yml | 12 ++++++++++-- jooqdsl-maven-plugin/pom.xml | 14 ++++++++------ .../src/it/multi-module/app/pom.xml | 7 +------ jooqdsl-maven-plugin/src/it/multi-module/pom.xml | 11 ++++++----- jooqdsl-maven-plugin/src/it/simple-java/pom.xml | 2 +- .../plugin/configuration/AdditionalSources.kt | 6 ++---- .../jooqdsl/plugin/mojo/JooqDslGenerateMojo.kt | 1 + .../services/javax.script.ScriptEngineFactory | 2 +- pom.xml | 7 ++++--- 9 files changed, 34 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3a2579e..a2920e8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,14 +7,22 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: cache: maven distribution: adopt java-version: 17 + - name: Cache Maven packages + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Build project run: mvn -B clean compile verify diff --git a/jooqdsl-maven-plugin/pom.xml b/jooqdsl-maven-plugin/pom.xml index 73fe764..b1abebc 100644 --- a/jooqdsl-maven-plugin/pom.xml +++ b/jooqdsl-maven-plugin/pom.xml @@ -16,6 +16,7 @@ false + 3.13.0 3.8.0 @@ -28,8 +29,9 @@ org.jetbrains.kotlin - kotlin-script-util + kotlin-scripting-jsr223 ${kotlin.version} + runtime org.jetbrains.kotlin @@ -61,19 +63,19 @@ org.apache.maven maven-core - ${maven-plugin.version} + ${maven.version} provided org.apache.maven maven-plugin-api - ${maven-plugin.version} + ${maven.version} provided org.apache.maven.plugin-tools maven-plugin-annotations - ${maven-plugin.version} + ${maven-plugin-plugin.version} provided @@ -136,7 +138,7 @@ org.apache.maven maven-compat - ${maven-plugin.version} + ${maven.version} test @@ -190,7 +192,7 @@ org.apache.maven.plugins maven-plugin-plugin - ${maven-plugin.version} + ${maven-plugin-plugin.version} jooqdsl true diff --git a/jooqdsl-maven-plugin/src/it/multi-module/app/pom.xml b/jooqdsl-maven-plugin/src/it/multi-module/app/pom.xml index 9622d39..38b3724 100644 --- a/jooqdsl-maven-plugin/src/it/multi-module/app/pom.xml +++ b/jooqdsl-maven-plugin/src/it/multi-module/app/pom.xml @@ -30,11 +30,6 @@ multimodule-model 1.0.0 - - javax.annotation - javax.annotation-api - 1.3.2 - com.fasterxml.jackson.core jackson-databind @@ -119,7 +114,7 @@ org.testcontainers.containers.PostgreSQLContainerProvider - 10.3 + ${postgresql-engine.version} src/main/resources/db/migration diff --git a/jooqdsl-maven-plugin/src/it/multi-module/pom.xml b/jooqdsl-maven-plugin/src/it/multi-module/pom.xml index a4505d9..173aafc 100644 --- a/jooqdsl-maven-plugin/src/it/multi-module/pom.xml +++ b/jooqdsl-maven-plugin/src/it/multi-module/pom.xml @@ -23,20 +23,21 @@ ${java.version} official - 1.8.0 - 2.15.2 + 2.0.0 + 2.17.1 42.3.9 + 10.3 1.20.1 @project.version@ - 5.10.0 - 3.24.2 + 5.10.2 + 3.26.0 - 3.1.2 + 3.3.0 diff --git a/jooqdsl-maven-plugin/src/it/simple-java/pom.xml b/jooqdsl-maven-plugin/src/it/simple-java/pom.xml index b1138bd..e0dc748 100644 --- a/jooqdsl-maven-plugin/src/it/simple-java/pom.xml +++ b/jooqdsl-maven-plugin/src/it/simple-java/pom.xml @@ -18,7 +18,7 @@ ${java.version} - 42.6.1 + 42.7.3 10.3 1.20.1 @project.version@ diff --git a/jooqdsl-maven-plugin/src/main/kotlin/io/github/osguima3/jooqdsl/plugin/configuration/AdditionalSources.kt b/jooqdsl-maven-plugin/src/main/kotlin/io/github/osguima3/jooqdsl/plugin/configuration/AdditionalSources.kt index 836502b..4989ac5 100644 --- a/jooqdsl-maven-plugin/src/main/kotlin/io/github/osguima3/jooqdsl/plugin/configuration/AdditionalSources.kt +++ b/jooqdsl-maven-plugin/src/main/kotlin/io/github/osguima3/jooqdsl/plugin/configuration/AdditionalSources.kt @@ -49,9 +49,7 @@ private fun precompileKotlin(sources: AdditionalSources, environment: ExecutionE goal("compile"), configuration( element("jvmTarget", environment.mavenProject.properties.getProperty("maven.compiler.target", "17")), - element("sourceDirs", *sources - .map { element("sourceDir", it) } - .toTypedArray()) + element("sourceDirs", *sources.map { element("sourceDir", it) }.toTypedArray()) ), environment ) @@ -62,7 +60,7 @@ private fun precompileJava(sources: AdditionalSources, environment: ExecutionEnv plugin( groupId("org.apache.maven.plugins"), artifactId("maven-compiler-plugin"), - version("3.11.0") + version("3.13.0") ), goal("compile"), configuration( diff --git a/jooqdsl-maven-plugin/src/main/kotlin/io/github/osguima3/jooqdsl/plugin/mojo/JooqDslGenerateMojo.kt b/jooqdsl-maven-plugin/src/main/kotlin/io/github/osguima3/jooqdsl/plugin/mojo/JooqDslGenerateMojo.kt index fb689fc..8396544 100644 --- a/jooqdsl-maven-plugin/src/main/kotlin/io/github/osguima3/jooqdsl/plugin/mojo/JooqDslGenerateMojo.kt +++ b/jooqdsl-maven-plugin/src/main/kotlin/io/github/osguima3/jooqdsl/plugin/mojo/JooqDslGenerateMojo.kt @@ -135,6 +135,7 @@ class JooqDslGenerateMojo : AbstractMojo() { try { map { File(project.basedir, it) }.forEach { log.info("Precompiling sources from $it") } precompile(executionEnvironment(project, session, pluginManager)) + log.info("Sources precompiled successfully!") } catch (e: MojoExecutionException) { log.error(e) throw MojoExecutionException("Could not precompile sources. Make sure all dependencies are included", e) diff --git a/jooqdsl-maven-plugin/src/main/resources/META-INF/services/javax.script.ScriptEngineFactory b/jooqdsl-maven-plugin/src/main/resources/META-INF/services/javax.script.ScriptEngineFactory index fa84d5e..807b345 100644 --- a/jooqdsl-maven-plugin/src/main/resources/META-INF/services/javax.script.ScriptEngineFactory +++ b/jooqdsl-maven-plugin/src/main/resources/META-INF/services/javax.script.ScriptEngineFactory @@ -1 +1 @@ -org.jetbrains.kotlin.script.jsr223.KotlinJsr223JvmLocalScriptEngineFactory +kotlin.script.experimental.jsr223.KotlinJsr223DefaultScriptEngineFactory diff --git a/pom.xml b/pom.xml index a6e4ec7..053f2fc 100644 --- a/pom.xml +++ b/pom.xml @@ -41,11 +41,11 @@ true 17 - 1.8.0 + 2.0.0 ${java.version} ${java.version} - 3.9.0 + 3.9.8 2.4.0 4.0.2 3.19.11 @@ -58,6 +58,7 @@ 2.17.2 + 3.13.1 3.3.1 3.5.0 3.2.5 @@ -152,7 +153,7 @@ javadocJar - ${java.version} + ${maven.compiler.source}