From 5c8516a8a6d101558fe9092635bae103eced1c99 Mon Sep 17 00:00:00 2001 From: Hartmut Bauer Date: Mon, 6 Apr 2026 02:05:57 +0200 Subject: [PATCH] Update Kotlin 2.3.20/ Java 25 --- books/build.gradle.kts | 2 +- books/buildnumber.properties | 4 +- .../net/keinekekse/app/books/Version.kt | 6 +- gradle/libs.versions.toml | 4 +- gradle/wrapper/gradle-wrapper.properties | 2 +- server/build.gradle.kts | 1 + .../app/server/books/calibre/migration.kt | 150 ++++++++++++++++++ settings.gradle.kts | 2 +- 8 files changed, 162 insertions(+), 9 deletions(-) create mode 100644 server/src/main/kotlin/net/keinekekse/app/server/books/calibre/migration.kt diff --git a/books/build.gradle.kts b/books/build.gradle.kts index 342e2ba..8439188 100644 --- a/books/build.gradle.kts +++ b/books/build.gradle.kts @@ -81,7 +81,7 @@ compose.desktop { mainClass = "net.keinekekse.app.MainKt" nativeDistributions { - targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) + targetFormats(TargetFormat.Dmg, TargetFormat.Msi) //, TargetFormat.AppImage) packageName = project.name packageVersion = project.version.toString() } diff --git a/books/buildnumber.properties b/books/buildnumber.properties index 920ac1d..793b1d2 100644 --- a/books/buildnumber.properties +++ b/books/buildnumber.properties @@ -1,3 +1,3 @@ #auto generated -#Thu Feb 12 22:52:33 CET 2026 -build.number=251 +#Thu Mar 26 00:33:48 CET 2026 +build.number=252 diff --git a/books/src/commonMain/kotlin/net/keinekekse/app/books/Version.kt b/books/src/commonMain/kotlin/net/keinekekse/app/books/Version.kt index b8c327a..89f9eb8 100644 --- a/books/src/commonMain/kotlin/net/keinekekse/app/books/Version.kt +++ b/books/src/commonMain/kotlin/net/keinekekse/app/books/Version.kt @@ -4,13 +4,13 @@ import net.keinekekse.version.Version object VERSION: Version { override val version = "1.0.0" - override val fullVersion = "1.0.0+build.251" + override val fullVersion = "1.0.0+build.252" override val major = 1 override val minor = 0 override val patch = 0 override val preRelease = "" - override val buildMetadata = "build.251" - override val buildDate = "2026-02-12T21:52:33.708217Z" + override val buildMetadata = "build.252" + override val buildDate = "2026-03-25T23:33:48.260883Z" override val displayName = "Books App" override val copyright = "Copyright (c) 2026 Hartmut Bauer" override val name = "books" diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3e03680..5d476b4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -13,7 +13,7 @@ hikari = "7.0.2" junit = "4.13.2" koin-bom = "4.2.0-RC1" koin-plugin = "0.3.0" -kotlin = "2.3.0" +kotlin = "2.3.20" kotlin-wrappers-css = "2025.6.4" kotlinx-coroutines = "1.10.2" kotlinx-html = "0.12.0" @@ -22,6 +22,7 @@ ktor = "3.4.0" logback = "1.5.28" material3 = "1.10.0-alpha05" postgres = "42.7.9" +sqlite = "3.51.1.0" uiDesktop = "1.7.0" [libraries] @@ -97,6 +98,7 @@ ktor-serverStatusPages = { module = "io.ktor:ktor-server-status-pages-jvm", vers logback = { module = "ch.qos.logback:logback-classic", version.ref = "logback" } postgresql = { module = "org.postgresql:postgresql", version.ref = "postgres" } +sqlite-jdbc = { module = "org.xerial:sqlite-jdbc", version.ref = "sqlite" } [plugins] composeCompiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 23449a2..c61a118 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/server/build.gradle.kts b/server/build.gradle.kts index 9295bc7..30de862 100644 --- a/server/build.gradle.kts +++ b/server/build.gradle.kts @@ -59,6 +59,7 @@ dependencies { implementation(libs.exposed.jdbc) implementation(libs.exposed.dao) implementation(libs.hikaricp) + implementation(libs.sqlite.jdbc) testImplementation(libs.ktor.serverTestHost) testImplementation(libs.kotlin.testJunit) diff --git a/server/src/main/kotlin/net/keinekekse/app/server/books/calibre/migration.kt b/server/src/main/kotlin/net/keinekekse/app/server/books/calibre/migration.kt new file mode 100644 index 0000000..787681e --- /dev/null +++ b/server/src/main/kotlin/net/keinekekse/app/server/books/calibre/migration.kt @@ -0,0 +1,150 @@ +package net.keinekekse.app.server.books.calibre + +/* +Database.connect("jdbc:sqlite:todo.db", driver = "org.sqlite.JDBC") + +create table main.authors +( + id INTEGER + primary key, + name TEXT collate NOCASE not null + unique, + sort TEXT collate NOCASE, + link TEXT default "" not null +); +----------- +create table main.books +( + id INTEGER + primary key autoincrement, + title TEXT collate NOCASE default 'Unknown' not null, + sort TEXT collate NOCASE, + timestamp TIMESTAMP default CURRENT_TIMESTAMP, + pubdate TIMESTAMP default CURRENT_TIMESTAMP, + series_index REAL default 1.0 not null, + author_sort TEXT collate NOCASE, + isbn TEXT collate NOCASE default "", + lccn TEXT collate NOCASE default "", + path TEXT default "" not null, + flags INTEGER default 1 not null, + uuid TEXT, + has_cover BOOL default 0, + last_modified TIMESTAMP default "2000-01-01 00:00:00+00:00" not null +); + +create index main.authors_idx + on main.books (author_sort); + +create index main.books_idx + on main.books (sort); +------------- +create table main.series +( + id INTEGER + primary key, + name TEXT collate NOCASE not null + unique, + sort TEXT collate NOCASE, + link TEXT default '' not null +); + +create index main.series_idx + on main.series (name); +---------------------- +create table main.publishers +( + id INTEGER + primary key, + name TEXT collate NOCASE not null + unique, + sort TEXT collate NOCASE, + link TEXT default '' not null +); + +create index main.publishers_idx + on main.publishers (name); +------------------ +create table main.languages +( + id INTEGER + primary key, + lang_code TEXT NON collate NOCASE + unique, + link TEXT default '' not null +); + +create index main.languages_idx + on main.languages (lang_code); +----------------- +create table main.identifiers +( + id INTEGER + primary key, + book INTEGER NON, + type TEXT NON collate NOCASE default "isbn", + val TEXT NON collate NOCASE, + unique (book, type) +); +------------------ +create table main.books_authors_link +( + id INTEGER + primary key, + book INTEGER not null, + author INTEGER not null, + unique (book, author) +); + +create index main.books_authors_link_aidx + on main.books_authors_link (author); + +create index main.books_authors_link_bidx + on main.books_authors_link (book); +------------------------ +create table main.books_languages_link +( + id INTEGER + primary key, + book INTEGER not null, + lang_code INTEGER not null, + item_order INTEGER default 0 not null, + unique (book, lang_code) +); + +create index main.books_languages_link_aidx + on main.books_languages_link (lang_code); + +create index main.books_languages_link_bidx + on main.books_languages_link (book); +--------------------- +create table main.books_publishers_link +( + id INTEGER + primary key, + book INTEGER not null + unique, + publisher INTEGER not null +); + +create index main.books_publishers_link_aidx + on main.books_publishers_link (publisher); + +create index main.books_publishers_link_bidx + on main.books_publishers_link (book); +------------------- +create table main.books_series_link +( + id INTEGER + primary key, + book INTEGER not null + unique, + series INTEGER not null +); + +create index main.books_series_link_aidx + on main.books_series_link (series); + +create index main.books_series_link_bidx + on main.books_series_link (book); + + */ diff --git a/settings.gradle.kts b/settings.gradle.kts index df4bb8a..95ccb15 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -28,7 +28,7 @@ dependencyResolutionManagement { } versionCatalogs { create("masterLibs") { - from("net.keinekekse:version-catalog:128") + from("net.keinekekse:version-catalog:129") } }