From e3401fbe873e503d16c725057d56e308d6dea94a Mon Sep 17 00:00:00 2001 From: Isaac Udy Date: Mon, 29 Jun 2026 11:31:34 +1200 Subject: [PATCH] Bump Kotlin 2.4.0, Compose 1.11.1, and DB stack (Exposed 1.x, Flyway 12, Hikari 7) - Kotlin 2.3.21 -> 2.4.0, KSP 2.3.3 -> 2.3.9 - Compose Multiplatform 1.10.3 -> 1.11.1, androidx-lifecycle 2.9.6 -> 2.10.0 - Postgres stack: Exposed 0.61.0 -> 1.3.0, Flyway 11 -> 12.9.0, HikariCP 6 -> 7.1.0, postgresql 42.7.11, zonky embedded 2.2.2 / binaries 18.4.0 (PG18), slf4j 2.0.18 - Migrate Exposed imports to the 1.0 v1.* package layout (org.jetbrains.exposed.sql.* -> v1.core.* / v1.jdbc.*), including codegen-emitted imports - Verified: postgres modules compile + integration tests pass on embedded PG18 Co-Authored-By: Claude Opus 4.8 --- gradle/libs.versions.toml | 31 ++++++++++--------- .../postgres/codegen/TableSourceWriter.kt | 8 ++--- .../udytils/postgres/JsonColumnType.kt | 2 +- .../udytils/postgres/JsonbColumnType.kt | 2 +- .../udytils/postgres/TemporalColumnTypes.kt | 6 ++-- .../udytils/postgres/TextArrayColumnType.kt | 2 +- .../udytils/postgres/TimestampColumnType.kt | 6 ++-- .../postgres/koin/PostgresKoinModule.kt | 2 +- 8 files changed, 30 insertions(+), 29 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index baa789d..56c327c 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,8 +1,8 @@ [versions] udytilsVersionName = "1.2.1" -kotlin = "2.3.21" -ksp = "2.3.3" +kotlin = "2.4.0" +ksp = "2.3.9" # Pinned to 9.0.0 (not 9.1+/9.2+) so the project can still be synced in IntelliJ IDEA, # whose bundled Android plugin currently supports AGP up to 9.0.0. The KMP modules use the @@ -14,7 +14,7 @@ android-compileSdk = "36" android-targetSdk = "36" maven-publish = "0.34.0" -compose = "1.10.3" +compose = "1.11.1" kotlinx-coroutines = "1.10.2" kotlinx-serialization = "1.11.0" @@ -22,7 +22,7 @@ kotlinx-datetime = "0.7.1" kotlinx-io = "0.8.0" androidx-activity = "1.11.0" -androidx-lifecycle = "2.9.6" +androidx-lifecycle = "2.10.0" androidx-appcompat = "1.7.1" enro = "3.0.0-alpha09" @@ -41,18 +41,19 @@ ktor = "3.4.1" # urpc-koin compiled against 4.0.4 hit NoSuchMethodError against a 4.2.1 runtime. koin = "4.2.1" -# Postgres database-management toolkit. Versions mirror the primary consumer -# (Reglyph) exactly — these modules are consumed via composite build, so a -# version skew against the consumer's resolved classpath risks NoSuchMethodError -# the same way Ktor/Koin do. -exposed = "0.61.0" -postgresql = "42.7.5" -hikaricp = "6.2.1" -flyway = "11.3.3" -zonky-embedded-postgres = "2.0.7" -zonky-postgres-binaries = "16.4.0" +# Postgres database-management toolkit. Bumped ahead of the primary consumer +# (Reglyph) during the Kotlin 2.4 / Exposed 1.x upgrade. Exposed 1.0 relocated its +# packages to org.jetbrains.exposed.v1.* (core) and .v1.jdbc.*, so a consumer still +# on 0.61 will break (ClassNotFound), not just skew — migrate Reglyph in lockstep +# when you bump it, since these modules are consumed there via composite build. +exposed = "1.3.0" +postgresql = "42.7.11" +hikaricp = "7.1.0" +flyway = "12.9.0" +zonky-embedded-postgres = "2.2.2" +zonky-postgres-binaries = "18.4.0" logback = "1.5.24" -slf4j = "2.0.17" +slf4j = "2.0.18" [libraries] kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } diff --git a/postgres/codegen/src/main/kotlin/dev/isaacudy/udytils/postgres/codegen/TableSourceWriter.kt b/postgres/codegen/src/main/kotlin/dev/isaacudy/udytils/postgres/codegen/TableSourceWriter.kt index 0c5b659..2debd14 100644 --- a/postgres/codegen/src/main/kotlin/dev/isaacudy/udytils/postgres/codegen/TableSourceWriter.kt +++ b/postgres/codegen/src/main/kotlin/dev/isaacudy/udytils/postgres/codegen/TableSourceWriter.kt @@ -76,10 +76,10 @@ class TableSourceWriter( private fun buildImports(columns: List): List { val set = sortedSetOf() - set += "org.jetbrains.exposed.sql.Column" - set += "org.jetbrains.exposed.sql.ResultRow" - set += "org.jetbrains.exposed.sql.Table" - set += "org.jetbrains.exposed.sql.statements.UpdateBuilder" + set += "org.jetbrains.exposed.v1.core.Column" + set += "org.jetbrains.exposed.v1.core.ResultRow" + set += "org.jetbrains.exposed.v1.core.Table" + set += "org.jetbrains.exposed.v1.core.statements.UpdateBuilder" for (column in columns) set += column.imports return set.toList() } diff --git a/postgres/core/src/main/kotlin/dev/isaacudy/udytils/postgres/JsonColumnType.kt b/postgres/core/src/main/kotlin/dev/isaacudy/udytils/postgres/JsonColumnType.kt index efbdbec..ffddce6 100644 --- a/postgres/core/src/main/kotlin/dev/isaacudy/udytils/postgres/JsonColumnType.kt +++ b/postgres/core/src/main/kotlin/dev/isaacudy/udytils/postgres/JsonColumnType.kt @@ -1,6 +1,6 @@ package dev.isaacudy.udytils.postgres -import org.jetbrains.exposed.sql.ColumnType +import org.jetbrains.exposed.v1.core.ColumnType import org.postgresql.util.PGobject /** diff --git a/postgres/core/src/main/kotlin/dev/isaacudy/udytils/postgres/JsonbColumnType.kt b/postgres/core/src/main/kotlin/dev/isaacudy/udytils/postgres/JsonbColumnType.kt index 4f45f71..026153c 100644 --- a/postgres/core/src/main/kotlin/dev/isaacudy/udytils/postgres/JsonbColumnType.kt +++ b/postgres/core/src/main/kotlin/dev/isaacudy/udytils/postgres/JsonbColumnType.kt @@ -1,6 +1,6 @@ package dev.isaacudy.udytils.postgres -import org.jetbrains.exposed.sql.ColumnType +import org.jetbrains.exposed.v1.core.ColumnType import org.postgresql.util.PGobject /** diff --git a/postgres/core/src/main/kotlin/dev/isaacudy/udytils/postgres/TemporalColumnTypes.kt b/postgres/core/src/main/kotlin/dev/isaacudy/udytils/postgres/TemporalColumnTypes.kt index c946aab..fea13f0 100644 --- a/postgres/core/src/main/kotlin/dev/isaacudy/udytils/postgres/TemporalColumnTypes.kt +++ b/postgres/core/src/main/kotlin/dev/isaacudy/udytils/postgres/TemporalColumnTypes.kt @@ -1,8 +1,8 @@ package dev.isaacudy.udytils.postgres -import org.jetbrains.exposed.sql.Column -import org.jetbrains.exposed.sql.ColumnType -import org.jetbrains.exposed.sql.Table +import org.jetbrains.exposed.v1.core.Column +import org.jetbrains.exposed.v1.core.ColumnType +import org.jetbrains.exposed.v1.core.Table import java.time.LocalDate import java.time.LocalDateTime import java.time.LocalTime diff --git a/postgres/core/src/main/kotlin/dev/isaacudy/udytils/postgres/TextArrayColumnType.kt b/postgres/core/src/main/kotlin/dev/isaacudy/udytils/postgres/TextArrayColumnType.kt index 6cae768..69a83a2 100644 --- a/postgres/core/src/main/kotlin/dev/isaacudy/udytils/postgres/TextArrayColumnType.kt +++ b/postgres/core/src/main/kotlin/dev/isaacudy/udytils/postgres/TextArrayColumnType.kt @@ -1,6 +1,6 @@ package dev.isaacudy.udytils.postgres -import org.jetbrains.exposed.sql.ColumnType +import org.jetbrains.exposed.v1.core.ColumnType import java.sql.Array as SqlArray /** diff --git a/postgres/core/src/main/kotlin/dev/isaacudy/udytils/postgres/TimestampColumnType.kt b/postgres/core/src/main/kotlin/dev/isaacudy/udytils/postgres/TimestampColumnType.kt index ba79300..2bb175b 100644 --- a/postgres/core/src/main/kotlin/dev/isaacudy/udytils/postgres/TimestampColumnType.kt +++ b/postgres/core/src/main/kotlin/dev/isaacudy/udytils/postgres/TimestampColumnType.kt @@ -1,8 +1,8 @@ package dev.isaacudy.udytils.postgres -import org.jetbrains.exposed.sql.Column -import org.jetbrains.exposed.sql.ColumnType -import org.jetbrains.exposed.sql.Table +import org.jetbrains.exposed.v1.core.Column +import org.jetbrains.exposed.v1.core.ColumnType +import org.jetbrains.exposed.v1.core.Table import java.time.OffsetDateTime import java.time.ZoneOffset import kotlin.time.Instant diff --git a/postgres/koin/src/main/kotlin/dev/isaacudy/udytils/postgres/koin/PostgresKoinModule.kt b/postgres/koin/src/main/kotlin/dev/isaacudy/udytils/postgres/koin/PostgresKoinModule.kt index 835e71f..84d935c 100644 --- a/postgres/koin/src/main/kotlin/dev/isaacudy/udytils/postgres/koin/PostgresKoinModule.kt +++ b/postgres/koin/src/main/kotlin/dev/isaacudy/udytils/postgres/koin/PostgresKoinModule.kt @@ -4,7 +4,7 @@ import dev.isaacudy.udytils.postgres.PgNotificationBus import dev.isaacudy.udytils.postgres.PostgresConfig import dev.isaacudy.udytils.postgres.PostgresMigrator import dev.isaacudy.udytils.postgres.buildHikariDataSource -import org.jetbrains.exposed.sql.Database +import org.jetbrains.exposed.v1.jdbc.Database import org.koin.core.module.Module import org.koin.dsl.module import javax.sql.DataSource