Skip to content

Commit 7bbb6a6

Browse files
migration onto kotlin 2.1.20 and ktgbotapi 24.0.2
1 parent f6bce64 commit 7bbb6a6

File tree

5 files changed

+33
-28
lines changed

5 files changed

+33
-28
lines changed

InlineQueriesBot/build.gradle

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,31 @@ plugins {
1212
id "org.jetbrains.kotlin.multiplatform"
1313
}
1414

15-
apply plugin: 'application'
16-
17-
mainClassName="InlineQueriesBotKt"
18-
1915
apply from: "$nativePartTemplate"
2016

2117
kotlin {
22-
jvm()
18+
jvm {
19+
binaries {
20+
executable {
21+
mainClass.set("InlineQueriesBotKt")
22+
}
23+
}
24+
}
2325

2426
sourceSets {
2527
commonMain {
2628
dependencies {
2729
implementation kotlin('stdlib')
2830

2931
api "dev.inmo:tgbotapi:$telegram_bot_api_version"
32+
api "dev.inmo:tgbotapi:$telegram_bot_api_version"
33+
}
34+
}
35+
jvmMain {
36+
dependencies {
37+
api "io.ktor:ktor-client-logging-jvm:$ktor_version"
3038
}
3139
}
3240
}
3341
}
3442

35-
dependencies {
36-
implementation 'io.ktor:ktor-client-logging-jvm:3.0.3'
37-
}
38-

RandomFileSenderBot/build.gradle

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ plugins {
1212
id "org.jetbrains.kotlin.multiplatform"
1313
}
1414

15-
apply plugin: 'application'
16-
17-
mainClassName="RandomFileSenderBotKt"
18-
1915
kotlin {
20-
jvm()
16+
jvm {
17+
binaries {
18+
executable {
19+
mainClass.set("RandomFileSenderBotKt")
20+
}
21+
}
22+
}
2123

2224
sourceSets {
2325
commonMain {

WebApp/build.gradle

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ plugins {
1616
id "org.jetbrains.compose" version "$compose_version"
1717
}
1818

19-
apply plugin: 'application'
20-
2119
kotlin {
22-
jvm()
20+
jvm {
21+
binaries {
22+
executable {
23+
mainClass.set("WebAppServerKt")
24+
}
25+
}
26+
}
2327
js(IR) {
2428
browser()
2529
binaries.executable()
@@ -31,14 +35,14 @@ kotlin {
3135
implementation kotlin('stdlib')
3236
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$serialization_version"
3337
implementation "dev.inmo:tgbotapi.core:$telegram_bot_api_version"
34-
implementation compose.runtime
3538
}
3639
}
3740

3841
jsMain {
3942
dependencies {
4043
implementation "dev.inmo:tgbotapi.webapps:$telegram_bot_api_version"
4144
implementation compose.web.core
45+
implementation compose.runtime
4246
}
4347
}
4448

@@ -47,16 +51,11 @@ kotlin {
4751
implementation "dev.inmo:tgbotapi:$telegram_bot_api_version"
4852
implementation "dev.inmo:micro_utils.ktor.server:$micro_utils_version"
4953
implementation "io.ktor:ktor-server-cio:$ktor_version"
50-
implementation compose.desktop.currentOs
5154
}
5255
}
5356
}
5457
}
5558

56-
application {
57-
mainClassName = "WebAppServerKt"
58-
}
59-
6059
tasks.getByName("compileKotlinJvm")
6160
.dependsOn(jsBrowserDistribution)
6261
tasks.getByName("compileKotlinJvm").configure {

gradle.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ org.gradle.jvmargs=-Xmx3148m
55
kotlin.daemon.jvmargs=-Xmx3g -Xms500m
66

77

8-
kotlin_version=2.1.0
9-
telegram_bot_api_version=23.1.2
10-
micro_utils_version=0.24.5
8+
kotlin_version=2.1.20
9+
telegram_bot_api_version=24.0.2
10+
micro_utils_version=0.25.3
1111
serialization_version=1.8.0
12-
ktor_version=3.0.3
12+
ktor_version=3.1.1
1313
compose_version=1.7.3

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip

0 commit comments

Comments
 (0)