Skip to content

Commit

Permalink
Add test for Komapper v5.0 (#31)
Browse files Browse the repository at this point in the history
* Update dependency versions

* Add test for Kotlin v2.1

* Remove spotless and ktlint

* Use compilerOptions
  • Loading branch information
nakamura-to authored Nov 29, 2024
1 parent e5d8c1e commit eca3c77
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 44 deletions.
35 changes: 18 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ on:
workflow_dispatch:

jobs:
kotlin-1_8:
kotlin-1_9:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
kotlin: [ 1.8.22 ]
ksp: [ 1.0.11 ]
komapper: [ 1.16.1 ]
kotlin: [ 1.9.24 ]
ksp: [ 1.0.20 ]
komapper: [ 1.18.1, 2.0.0, 2.1.0, 2.2.2 ]
timeout-minutes: 10

steps:
Expand Down Expand Up @@ -45,14 +45,14 @@ jobs:
name: build
path: ./**/build/reports

kotlin-1_9:
kotlin-2_0:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
kotlin: [ 1.9.24 ]
ksp: [ 1.0.20 ]
komapper: [ 1.18.1, 2.0.0, 2.1.0, 2.2.2 ]
kotlin: [ 2.0.21 ]
ksp: [ 1.0.28 ]
komapper: [ 2.0.0, 2.1.0, 2.2.2, 3.1.0, 4.0.0, 5.0.0 ]
timeout-minutes: 10

steps:
Expand All @@ -67,7 +67,7 @@ jobs:
- name: Assemble and Check
uses: gradle/gradle-build-action@v2
with:
gradle-version: 6.8.3
gradle-version: 7.6.4
arguments: |
assemble
check
Expand All @@ -82,14 +82,14 @@ jobs:
name: build
path: ./**/build/reports

kotlin-2_0:
kotlin-2_0-useKSP2:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
kotlin: [ 2.0.20 ]
ksp: [ 1.0.25 ]
komapper: [ 1.18.1, 2.0.0, 2.1.0, 2.2.2, 3.0.0 ]
kotlin: [ 2.0.21 ]
ksp: [ 1.0.28 ]
komapper: [ 2.0.0, 2.1.0, 2.2.2, 3.1.0, 4.0.0, 5.0.0 ]
timeout-minutes: 10

steps:
Expand All @@ -111,6 +111,7 @@ jobs:
-PkomapperVersion=${{ matrix.komapper }}
-PkotlinVersion=${{ matrix.kotlin }}
-PkspVersion=${{ matrix.ksp }}
-Pksp.useKSP2=true
- name: Upload reports
if: failure()
Expand All @@ -119,14 +120,14 @@ jobs:
name: build
path: ./**/build/reports

kotlin-2_0-useKSP2:
kotlin-2_1:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
kotlin: [ 2.0.20 ]
ksp: [ 1.0.25 ]
komapper: [ 1.18.1, 2.0.0, 2.1.0, 2.2.2, 3.0.0 ]
kotlin: [ 2.1.0 ]
ksp: [ 1.0.29 ]
komapper: [ 5.0.0 ]
timeout-minutes: 10

steps:
Expand Down
25 changes: 5 additions & 20 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,37 +1,20 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

plugins {
idea
java
kotlin("jvm")
id("com.diffplug.spotless")
id("com.google.devtools.ksp")
}

val komapperVersion: String by project
val ktlintVersion: String by project

allprojects {
apply(plugin = "base")
apply(plugin = "com.diffplug.spotless")

spotless {
kotlin {
ktlint(ktlintVersion)
targetExclude("build/**")
}
kotlinGradle {
ktlint(ktlintVersion)
}
}

repositories {
mavenCentral()
}

tasks {
build {
dependsOn(spotlessApply)
}
}
}

subprojects {
Expand Down Expand Up @@ -59,7 +42,9 @@ subprojects {
}

withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "11"
compilerOptions {
jvmTarget.set(JvmTarget.JVM_11)
}
}
}
}
8 changes: 3 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ org.gradle.jvmargs=-Xmx2560m
group=org.komapper
version=0.0.1

kotlinVersion=2.0.20
komapperVersion=3.0.0
kspVersion=1.0.25
ktlintVersion=0.45.2
spotlessVersion=6.11.0
kotlinVersion=2.1.0
komapperVersion=5.0.0
kspVersion=1.0.29
2 changes: 0 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ pluginManagement {
val kotlinVersion: String by settings
val komapperVersion: String by settings
val kspVersion: String by settings
val spotlessVersion: String by settings
plugins {
id("org.jetbrains.kotlin.jvm") version kotlinVersion
id("org.komapper.gradle") version komapperVersion
id("com.google.devtools.ksp") version "$kotlinVersion-$kspVersion"
id("com.diffplug.spotless") version spotlessVersion
}
}

Expand Down

0 comments on commit eca3c77

Please sign in to comment.