Skip to content

Commit

Permalink
Upgrade kotlin to version 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Osguima3 committed Sep 5, 2024
1 parent e94a811 commit 9718de0
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 28 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
14 changes: 8 additions & 6 deletions jooqdsl-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

<properties>
<skipJooq>false</skipJooq>
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
<maven-invoker-plugin.version>3.8.0</maven-invoker-plugin.version>
</properties>

Expand All @@ -28,8 +29,9 @@
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-script-util</artifactId>
<artifactId>kotlin-scripting-jsr223</artifactId>
<version>${kotlin.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
Expand Down Expand Up @@ -61,19 +63,19 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${maven-plugin.version}</version>
<version>${maven.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${maven-plugin.version}</version>
<version>${maven.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>${maven-plugin.version}</version>
<version>${maven-plugin-plugin.version}</version>
<scope>provided</scope>
</dependency>

Expand Down Expand Up @@ -136,7 +138,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>${maven-plugin.version}</version>
<version>${maven.version}</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -190,7 +192,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>${maven-plugin.version}</version>
<version>${maven-plugin-plugin.version}</version>
<configuration>
<goalPrefix>jooqdsl</goalPrefix>
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
Expand Down
7 changes: 1 addition & 6 deletions jooqdsl-maven-plugin/src/it/multi-module/app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@
<artifactId>multimodule-model</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
Expand Down Expand Up @@ -119,7 +114,7 @@
</additionalSources>
<container>
<provider>org.testcontainers.containers.PostgreSQLContainerProvider</provider>
<version>10.3</version>
<version>${postgresql-engine.version}</version>
<migrationPath>src/main/resources/db/migration</migrationPath>
</container>
</configuration>
Expand Down
11 changes: 6 additions & 5 deletions jooqdsl-maven-plugin/src/it/multi-module/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,21 @@
<maven.compiler.target>${java.version}</maven.compiler.target>
<kotlin.code.style>official</kotlin.code.style>

<kotlin.version>1.8.0</kotlin.version>
<jackson.version>2.15.2</jackson.version>
<kotlin.version>2.0.0</kotlin.version>
<jackson.version>2.17.1</jackson.version>

<!-- Database -->
<postgresql.version>42.3.9</postgresql.version>
<postgresql-engine.version>10.3</postgresql-engine.version>
<testcontainers.version>1.20.1</testcontainers.version>
<jooqdsl.version>@project.version@</jooqdsl.version>

<!-- Test dependencies -->
<junit-jupiter.version>5.10.0</junit-jupiter.version>
<assertj.version>3.24.2</assertj.version>
<junit-jupiter.version>5.10.2</junit-jupiter.version>
<assertj.version>3.26.0</assertj.version>

<!-- Plugins -->
<maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
<maven-surefire-plugin.version>3.3.0</maven-surefire-plugin.version>
</properties>

<dependencyManagement>
Expand Down
2 changes: 1 addition & 1 deletion jooqdsl-maven-plugin/src/it/simple-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<maven.compiler.target>${java.version}</maven.compiler.target>

<!-- Database -->
<postgresql.version>42.6.1</postgresql.version>
<postgresql.version>42.7.3</postgresql.version>
<postgresql-engine.version>10.3</postgresql-engine.version>
<testcontainers.version>1.20.1</testcontainers.version>
<jooqdsl.version>@project.version@</jooqdsl.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand All @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
org.jetbrains.kotlin.script.jsr223.KotlinJsr223JvmLocalScriptEngineFactory
kotlin.script.experimental.jsr223.KotlinJsr223DefaultScriptEngineFactory
7 changes: 4 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
<kotlin.compiler.incremental>true</kotlin.compiler.incremental>

<java.version>17</java.version>
<kotlin.version>1.8.0</kotlin.version>
<kotlin.version>2.0.0</kotlin.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>

<maven-plugin.version>3.9.0</maven-plugin.version>
<maven.version>3.9.8</maven.version>
<mojo-executor.version>2.4.0</mojo-executor.version>
<jakarta-xml.version>4.0.2</jakarta-xml.version>
<jooq.version>3.19.11</jooq.version>
Expand All @@ -58,6 +58,7 @@
<jackson.version>2.17.2</jackson.version>

<!-- Plugins -->
<maven-plugin-plugin.version>3.13.1</maven-plugin-plugin.version>
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
<maven-surefire-plugin.version>3.5.0</maven-surefire-plugin.version>
<maven-gpg-plugin.version>3.2.5</maven-gpg-plugin.version>
Expand Down Expand Up @@ -152,7 +153,7 @@
<goal>javadocJar</goal>
</goals>
<configuration>
<jdkVersion>${java.version}</jdkVersion>
<jdkVersion>${maven.compiler.source}</jdkVersion>
</configuration>
</execution>
</executions>
Expand Down

0 comments on commit 9718de0

Please sign in to comment.