chore: Kotlin 2.0に対応

This commit is contained in:
usbharu 2024-05-21 22:41:18 +09:00
parent d0da23ee90
commit 56389c73aa
6 changed files with 10 additions and 8 deletions

View File

@ -26,8 +26,8 @@ open class Delete : Object, HasId, HasActor {
@JsonProperty("object") @JsonProperty("object")
val apObject: Object val apObject: Object
val published: String val published: String
override val actor: String override var actor: String = ""
override val id: String override var id: String = ""
constructor( constructor(
type: List<String> = emptyList(), type: List<String> = emptyList(),

View File

@ -18,10 +18,10 @@ package dev.usbharu.hideout.application.infrastructure.exposed
import org.jetbrains.exposed.sql.* import org.jetbrains.exposed.sql.*
fun <S> Query.withPagination(page: Page, exp: ExpressionWithColumnType<S>): PaginationList<ResultRow, S> { fun <S : Any> Query.withPagination(page: Page, exp: ExpressionWithColumnType<S>): PaginationList<ResultRow, S> {
page.limit?.let { limit(it) } page.limit?.let { limit(it) }
val resultRows = if (page.minId != null) { val resultRows = if (page.minId != null) {
page.maxId?.let { andWhere { exp.less(it) } } page.maxId?.let { it: Long -> andWhere { exp.less(it) } }
andWhere { exp.greater(page.minId!!) } andWhere { exp.greater(page.minId!!) }
reversed() reversed()
} else { } else {

View File

@ -1,6 +1,6 @@
[versions] [versions]
kotlin = "1.9.24" kotlin = "2.0.0"
ktor = "2.3.11" ktor = "2.3.11"
exposed = "0.50.1" exposed = "0.50.1"
javacv-ffmpeg = "6.1.1-1.5.10" javacv-ffmpeg = "6.1.1-1.5.10"

View File

@ -1,5 +1,6 @@
plugins { plugins {
alias(libs.plugins.kotlin.jvm) // alias(libs.plugins.kotlin.jvm)
id("org.jetbrains.kotlin.jvm") version "1.9.24"
} }

View File

@ -2,4 +2,4 @@ kotlin.code.style=official
org.gradle.daemon=true org.gradle.daemon=true
org.gradle.parallel=true org.gradle.parallel=true
org.gradle.configureondemand=true org.gradle.configureondemand=true
#ksp.useKSP2=true

View File

@ -1,5 +1,6 @@
plugins { plugins {
alias(libs.plugins.kotlin.jvm) // alias(libs.plugins.kotlin.jvm)
kotlin("jvm")
id("com.google.protobuf") version "0.9.4" id("com.google.protobuf") version "0.9.4"
id("com.google.devtools.ksp") version "1.9.24-1.0.20" id("com.google.devtools.ksp") version "1.9.24-1.0.20"
} }