diff --git a/CHANGELOG.md b/CHANGELOG.md index d3afff8..fb8d7a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # PlaguPoster +## 0.12.0 + +* `Versions`: + * `kotlin`: `2.3.10` -> `2.4.21` + * `kotlin-serialization`: `1.10.0` -> `1.11.0` + * `psql`: `42.6.0` -> `42.7.14` + * `dokka`: `2.0.0` -> `2.2.0` + * `nmcp`: `1.4.4` -> `1.6.2` + * `plagubot`: `11.1.0` -> `14.0.0` + * `tgbotapi`: `32.0.0` -> `37.1.0` + * `microutils`: `0.29.1` -> `0.32.0` + * `kslog`: `1.6.0` -> `2.1.0` + * `krontab`: `2.8.0` -> `3.1.0` + * `plagubot-plugins`: `0.25.0` -> `0.29.0` + * `Docker JDK`: `19` -> `21.0.12.1` + * `Gradle`: `8.13` -> `9.7.0` +* Adapt forwarded-message copying and replies to updated Telegram message types +* Migrate compiler options and application main class configuration for Kotlin 2.4 and Gradle 9 + ## 0.11.1 * Update `PlaguBot` dependency to allow using of `proxy` section in config diff --git a/gradle.properties b/gradle.properties index 7f8aaf7..b008743 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,4 +9,4 @@ android.enableJetifier=true # Project data group=dev.inmo -version=0.11.1 +version=0.12.0 diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fd6e3a7..5205c3a 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,20 +1,20 @@ [versions] -kotlin = "2.3.10" -kotlin-serialization = "1.10.0" +kotlin = "2.4.21" +kotlin-serialization = "1.11.0" -plagubot = "11.1.0" -tgbotapi = "32.0.0" -microutils = "0.29.1" -kslog = "1.6.0" -krontab = "2.8.0" -plagubot-plugins = "0.25.0" +plagubot = "14.0.0" +tgbotapi = "37.1.0" +microutils = "0.32.0" +kslog = "2.1.0" +krontab = "3.1.0" +plagubot-plugins = "0.29.0" -nmcp = "1.4.4" +nmcp = "1.6.2" -dokka = "2.0.0" +dokka = "2.2.0" -psql = "42.6.0" +psql = "42.7.14" github-release = "2.5.2" diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e708b1c..eddabd2 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 2733ed5..8bf5ce2 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.0-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/mppJavaProject.gradle b/mppJavaProject.gradle index 7c29891..e784d53 100644 --- a/mppJavaProject.gradle +++ b/mppJavaProject.gradle @@ -5,10 +5,8 @@ apply from: "$publishGradlePath" kotlin { jvm { - compilations.main { - kotlinOptions { - jvmTarget = "17" - } + compilerOptions { + jvmTarget = "JVM_17" } } diff --git a/mppProjectWithSerialization.gradle b/mppProjectWithSerialization.gradle index d65cc00..77a4233 100644 --- a/mppProjectWithSerialization.gradle +++ b/mppProjectWithSerialization.gradle @@ -5,10 +5,8 @@ apply from: "$publishGradlePath" kotlin { jvm { - compilations.main { - kotlinOptions { - jvmTarget = "17" - } + compilerOptions { + jvmTarget = "JVM_17" } } js (IR) { diff --git a/posts/src/commonMain/kotlin/sending/PostPublisher.kt b/posts/src/commonMain/kotlin/sending/PostPublisher.kt index 6135f09..36fcacf 100644 --- a/posts/src/commonMain/kotlin/sending/PostPublisher.kt +++ b/posts/src/commonMain/kotlin/sending/PostPublisher.kt @@ -49,7 +49,7 @@ class PostPublisher( toChatId = cachingChatId ) }.onSuccess { - bot.copyMessage(targetChatId, it) + bot.copyMessage(fromChatId = it.chat.id, messageId = it.messageId, toChatId = targetChatId) haveSentMessages = true } }.onSuccess { diff --git a/runner/Dockerfile b/runner/Dockerfile index 13a7085..49c6d38 100644 --- a/runner/Dockerfile +++ b/runner/Dockerfile @@ -1,4 +1,4 @@ -FROM bellsoft/liberica-openjdk-alpine:19 +FROM bellsoft/liberica-openjdk-alpine:21.0.12.1 USER 1000 diff --git a/runner/build.gradle b/runner/build.gradle index 4aeb4fe..9de057f 100644 --- a/runner/build.gradle +++ b/runner/build.gradle @@ -29,7 +29,7 @@ dependencies { } application { - mainClassName = 'dev.inmo.plagubot.AppKt' + mainClass = 'dev.inmo.plagubot.AppKt' } java { diff --git a/triggers/command/src/jvmMain/kotlin/Plugin.kt b/triggers/command/src/jvmMain/kotlin/Plugin.kt index de6d330..1a01a8b 100644 --- a/triggers/command/src/jvmMain/kotlin/Plugin.kt +++ b/triggers/command/src/jvmMain/kotlin/Plugin.kt @@ -69,8 +69,10 @@ object Plugin : Plugin { val postId = messageInReply ?.let { postsRepo.getIdByChatAndMessage(messageInReply.chat.id, messageInReply.messageId) ?: let { _ -> reply( - it, - "Unable to find any post related to the message in reply" + toChatId = it.chat.id, + toMessageId = it.messageId, + text = "Unable to find any post related to the message in reply", + ephemeralMessageParameters = null ) return@onCommand diff --git a/triggers/timer/src/jvmMain/kotlin/Plugin.kt b/triggers/timer/src/jvmMain/kotlin/Plugin.kt index 585b0c2..b8387a8 100644 --- a/triggers/timer/src/jvmMain/kotlin/Plugin.kt +++ b/triggers/timer/src/jvmMain/kotlin/Plugin.kt @@ -62,8 +62,10 @@ object Plugin : Plugin { exists != null ) reply( - it.message, - textSources, + toChatId = it.message.chat.id, + toMessageId = it.message.messageId, + entities = textSources, + ephemeralMessageParameters = null, replyMarkup = buttons )