start migration onto 25.0.0

This commit is contained in:
2025-05-11 21:13:58 +06:00
parent f87a9c5c66
commit 1708cad654
10 changed files with 48 additions and 44 deletions

View File

@@ -16,10 +16,14 @@ plugins {
id "org.jetbrains.compose" version "$compose_version"
}
apply plugin: 'application'
kotlin {
jvm()
jvm {
binaries {
executable {
mainClass.set("WebAppServerKt")
}
}
}
js(IR) {
browser()
binaries.executable()
@@ -53,10 +57,6 @@ kotlin {
}
}
application {
mainClassName = "WebAppServerKt"
}
tasks.getByName("compileKotlinJvm")
.dependsOn(jsBrowserDistribution)
tasks.getByName("compileKotlinJvm").configure {

View File

@@ -1,4 +1,5 @@
import androidx.compose.runtime.*
import dev.inmo.micro_utils.coroutines.launchLoggingDropExceptions
import dev.inmo.micro_utils.coroutines.launchSafelyWithoutExceptions
import dev.inmo.tgbotapi.types.CustomEmojiId
import dev.inmo.tgbotapi.types.userIdField
@@ -110,7 +111,7 @@ fun main() {
userId ?.let { userId ->
Button({
onClick {
scope.launchSafelyWithoutExceptions {
scope.launchLoggingDropExceptions {
client.post("$baseUrl/setCustomEmoji") {
parameter(userIdField, userId.long)
setBody(
@@ -130,7 +131,7 @@ fun main() {
Button({
onClick {
scope.launchSafelyWithoutExceptions {
scope.launchLoggingDropExceptions {
handleResult({ "Clicked" }) {
client.post("${window.location.origin.removeSuffix("/")}/inline") {
parameter(webAppQueryIdField, it)

View File

@@ -1,4 +1,5 @@
import dev.inmo.kslog.common.*
import dev.inmo.micro_utils.coroutines.subscribeLoggingDropExceptions
import dev.inmo.micro_utils.coroutines.subscribeSafelyWithoutExceptions
import dev.inmo.micro_utils.ktor.server.createKtorServer
import dev.inmo.tgbotapi.extensions.api.answers.answerInlineQuery
@@ -195,7 +196,7 @@ suspend fun main(vararg args: String) {
BotCommand("reply_markup", "Use to get reply markup keyboard with web app trigger"),
BotCommand("inline", "Use to get inline keyboard with web app trigger"),
)
allUpdatesFlow.subscribeSafelyWithoutExceptions(this) {
allUpdatesFlow.subscribeLoggingDropExceptions(this) {
println(it)
}
println(getMe())