| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- plugins {
- val kotlinVersion = "1.4.10"
- kotlin("jvm") version kotlinVersion
- kotlin("plugin.serialization") version kotlinVersion
- }
- group = "com.sirekanyan"
- version = "0.1"
- repositories {
- mavenCentral()
- }
- dependencies {
- implementation("org.telegram:telegrambots:4.9.1")
- implementation("io.ktor:ktor-client-cio:1.4.0")
- implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.0")
- implementation("org.slf4j:slf4j-simple:1.7.30")
- testImplementation("junit:junit:4.13")
- }
- tasks {
- compileKotlin {
- kotlinOptions.jvmTarget = "1.8"
- }
- jar {
- manifest.attributes["Main-Class"] = "com.sirekanyan.andersrobot.Main"
- from(configurations.runtimeClasspath.get().map(::zipTree))
- doLast {
- File("bot").also { file ->
- file.createNewFile()
- file.setExecutable(true)
- file.printWriter().use { writer ->
- writer.println("#!/usr/bin/env sh")
- writer.println("java -jar ${archiveFileName.get()} \"$@\"")
- }
- }
- }
- }
- }
|