diff --git a/.gitignore b/.gitignore index 7e5545b..61f7b1a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .idea +.kotlin/ out/* *.iml target diff --git a/CHANGELOG.md b/CHANGELOG.md index d4a8923..e75b7c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # PlaguPoster +## 0.7.0 + +* Dependencies update + ## 0.6.0 * Dependencies update diff --git a/gradle.properties b/gradle.properties index e265d68..1188d97 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,4 +9,4 @@ android.enableJetifier=true # Project data group=dev.inmo -version=0.6.0 +version=0.7.0 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 229ab2b..3df21b0 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,14 +1,14 @@ [versions] -kotlin = "1.9.23" -kotlin-serialization = "1.6.3" +kotlin = "2.0.20" +kotlin-serialization = "1.7.2" -plagubot = "8.4.0" -tgbotapi = "15.0.0" -microutils = "0.21.1" -kslog = "1.3.4" -krontab = "2.3.0" -plagubot-plugins = "0.19.0" +plagubot = "9.2.0" +tgbotapi = "18.1.0" +microutils = "0.22.2" +kslog = "1.3.6" +krontab = "2.4.0" +plagubot-plugins = "0.21.0" dokka = "1.9.20" diff --git a/mppJsProject.gradle b/mppJsProject.gradle index f7499b3..5e0b8b4 100644 --- a/mppJsProject.gradle +++ b/mppJsProject.gradle @@ -25,7 +25,6 @@ kotlin { jsTest { dependencies { implementation libs.kotlin.test.js - implementation libs.kotlin.test.junit } } } diff --git a/mppProjectWithSerialization.gradle b/mppProjectWithSerialization.gradle index e1b3148..d65cc00 100644 --- a/mppProjectWithSerialization.gradle +++ b/mppProjectWithSerialization.gradle @@ -37,7 +37,6 @@ kotlin { jsTest { dependencies { implementation libs.kotlin.test.js - implementation libs.kotlin.test.junit } } diff --git a/posts/src/jvmMain/kotlin/exposed/ExposedPostsRepo.kt b/posts/src/jvmMain/kotlin/exposed/ExposedPostsRepo.kt index 881e745..a448f9e 100644 --- a/posts/src/jvmMain/kotlin/exposed/ExposedPostsRepo.kt +++ b/posts/src/jvmMain/kotlin/exposed/ExposedPostsRepo.kt @@ -48,7 +48,7 @@ class ExposedPostsRepo( id, DateTime(get(createdColumn)), with(contentRepo) { - select { postIdColumn.eq(id.string) }.map { + selectAll().where { postIdColumn.eq(id.string) }.map { it.asObject } } @@ -69,14 +69,14 @@ class ExposedPostsRepo( id, DateTime(get(createdColumn)), with(contentRepo) { - select { postIdColumn.eq(id.string) }.map { + selectAll().where { postIdColumn.eq(id.string) }.map { it.asObject } } ) } - override fun createAndInsertId(value: NewPost, it: InsertStatement): PostId { + override fun createAndInsertId(value: NewPost, it: UpdateBuilder): PostId { val id = PostId(uuid4().toString()) it[idColumn] = id.string return id @@ -104,7 +104,7 @@ class ExposedPostsRepo( } } - override fun insert(value: NewPost, it: InsertStatement) { + override fun insert(value: NewPost, it: UpdateBuilder) { super.insert(value, it) it[createdColumn] = DateTime.now().unixMillis } @@ -144,7 +144,7 @@ class ExposedPostsRepo( existsIds } else { existsIds.filter { - select { selectById(it) }.limit(1).none() + selectAll().where { selectById(it) }.limit(1).none() } } }.forEach { @@ -156,7 +156,7 @@ class ExposedPostsRepo( override suspend fun getIdByChatAndMessage(chatId: IdChatIdentifier, messageId: MessageId): PostId? { return transaction(database) { with(contentRepo) { - select { + selectAll().where { chatIdColumn.eq(chatId.chatId.long) .and(chatId.threadId ?.let { threadIdColumn.eq(it.long) } ?: threadIdColumn.isNull()) .and(messageIdColumn.eq(messageId.long)) @@ -166,12 +166,12 @@ class ExposedPostsRepo( } override suspend fun getPostCreationTime(postId: PostId): DateTime? = transaction(database) { - select { selectById(postId) }.limit(1).firstOrNull() ?.get(createdColumn) ?.let(::DateTime) + selectAll().where { selectById(postId) }.limit(1).firstOrNull() ?.get(createdColumn) ?.let(::DateTime) } override suspend fun getFirstMessageInfo(postId: PostId): PostContentInfo? = transaction(database) { with(contentRepo) { - select { postIdColumn.eq(postId.string) }.limit(1).firstOrNull() ?.asObject + selectAll().where { postIdColumn.eq(postId.string) }.limit(1).firstOrNull() ?.asObject } } } diff --git a/ratings/source/src/jvmMain/kotlin/repos/ExposedPollsToMessagesInfoRepo.kt b/ratings/source/src/jvmMain/kotlin/repos/ExposedPollsToMessagesInfoRepo.kt index 7bd2667..d7d151a 100644 --- a/ratings/source/src/jvmMain/kotlin/repos/ExposedPollsToMessagesInfoRepo.kt +++ b/ratings/source/src/jvmMain/kotlin/repos/ExposedPollsToMessagesInfoRepo.kt @@ -44,7 +44,7 @@ class ExposedPollsToMessagesInfoRepo( it[messageIdColumn] = v.messageId.long } - override fun insertKey(k: PollId, v: ShortMessageInfo, it: InsertStatement) { + override fun insertKey(k: PollId, v: ShortMessageInfo, it: UpdateBuilder) { it[keyColumn] = k.string } } diff --git a/ratings/source/src/jvmMain/kotlin/repos/ExposedPollsToPostsIdsRepo.kt b/ratings/source/src/jvmMain/kotlin/repos/ExposedPollsToPostsIdsRepo.kt index e8b5b0a..2804677 100644 --- a/ratings/source/src/jvmMain/kotlin/repos/ExposedPollsToPostsIdsRepo.kt +++ b/ratings/source/src/jvmMain/kotlin/repos/ExposedPollsToPostsIdsRepo.kt @@ -27,7 +27,7 @@ class ExposedPollsToPostsIdsRepo( it[postIdColumn] = v.string } - override fun insertKey(k: PollId, v: PostId, it: InsertStatement) { + override fun insertKey(k: PollId, v: PostId, it: UpdateBuilder) { it[keyColumn] = k.string } } diff --git a/ratings/src/jvmMain/kotlin/exposed/ExposedRatingsRepo.kt b/ratings/src/jvmMain/kotlin/exposed/ExposedRatingsRepo.kt index 8a6dd5d..db39cae 100644 --- a/ratings/src/jvmMain/kotlin/exposed/ExposedRatingsRepo.kt +++ b/ratings/src/jvmMain/kotlin/exposed/ExposedRatingsRepo.kt @@ -33,7 +33,7 @@ class ExposedRatingsRepo ( it[ratingsColumn] = v.double } - override fun insertKey(k: PostId, v: Rating, it: InsertStatement) { + override fun insertKey(k: PostId, v: Rating, it: UpdateBuilder) { it[keyColumn] = k.string } diff --git a/triggers/timer/src/jvmMain/kotlin/repo/ExposedTimersRepo.kt b/triggers/timer/src/jvmMain/kotlin/repo/ExposedTimersRepo.kt index e8baf87..9f63e1a 100644 --- a/triggers/timer/src/jvmMain/kotlin/repo/ExposedTimersRepo.kt +++ b/triggers/timer/src/jvmMain/kotlin/repo/ExposedTimersRepo.kt @@ -50,7 +50,7 @@ class ExposedTimersRepo( it[dateTimeColumn] = v.unixMillisLong } - override fun insertKey(k: PostId, v: DateTime, it: InsertStatement) { + override fun insertKey(k: PostId, v: DateTime, it: UpdateBuilder) { it[keyColumn] = k.string }