mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI-examples.git
synced 2024-11-18 22:33:53 +00:00
58 lines
1.3 KiB
Groovy
58 lines
1.3 KiB
Groovy
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id "org.jetbrains.kotlin.multiplatform"
|
|
id "org.jetbrains.kotlin.plugin.serialization"
|
|
}
|
|
|
|
apply plugin: 'application'
|
|
|
|
kotlin {
|
|
jvm()
|
|
js(IR) {
|
|
browser()
|
|
binaries.executable()
|
|
}
|
|
|
|
sourceSets {
|
|
commonMain {
|
|
dependencies {
|
|
implementation kotlin('stdlib')
|
|
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$serialization_version"
|
|
}
|
|
}
|
|
|
|
jsMain {
|
|
dependencies {
|
|
implementation "dev.inmo:tgbotapi.webapps:$telegram_bot_api_version"
|
|
}
|
|
}
|
|
|
|
jvmMain {
|
|
dependencies {
|
|
implementation "dev.inmo:tgbotapi:$telegram_bot_api_version"
|
|
implementation "dev.inmo:micro_utils.ktor.server:$micro_utils_version"
|
|
implementation "io.ktor:ktor-server-cio:$ktor_version"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
application {
|
|
mainClassName = "WebAppServerKt"
|
|
}
|
|
|
|
tasks.getByName("compileKotlinJvm")
|
|
.dependsOn(jsBrowserDistribution)
|
|
tasks.getByName("compileKotlinJvm").configure {
|
|
mustRunAfter jsBrowserDistribution
|
|
}
|