2020-03-05 17:29:12 +08:00
|
|
|
plugins {
|
2020-03-25 12:21:37 +08:00
|
|
|
kotlin("jvm")
|
|
|
|
kotlin("plugin.serialization")
|
2020-03-05 17:29:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
apply(plugin = "com.github.johnrengelman.shadow")
|
|
|
|
|
|
|
|
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
|
|
|
|
manifest {
|
|
|
|
attributes["Main-Class"] = "net.mamoe.mirai.console.wrapper.WrapperMain"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
kotlin {
|
|
|
|
sourceSets {
|
|
|
|
all {
|
|
|
|
languageSettings.enableLanguageFeature("InlineClasses")
|
|
|
|
|
|
|
|
languageSettings.useExperimentalAnnotation("kotlin.Experimental")
|
|
|
|
languageSettings.useExperimentalAnnotation("kotlin.OptIn")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-03-06 16:34:17 +08:00
|
|
|
|
2020-03-05 17:29:12 +08:00
|
|
|
dependencies {
|
2020-03-24 18:02:19 +08:00
|
|
|
api(kotlin("stdlib", Versions.Kotlin.stdlib))
|
|
|
|
api(kotlin("reflect", Versions.Kotlin.stdlib))
|
2020-03-05 17:29:12 +08:00
|
|
|
|
2020-03-24 18:02:19 +08:00
|
|
|
api(kotlinx("coroutines-core", Versions.Kotlin.coroutines))
|
2020-05-06 14:40:53 +08:00
|
|
|
api(kotlinx("coroutines-swing", Versions.Kotlin.coroutines))
|
2020-03-26 22:04:48 +08:00
|
|
|
|
2020-03-28 21:02:33 +08:00
|
|
|
api(ktor("client-cio", Versions.Kotlin.ktor))
|
|
|
|
api(ktor("client-core", Versions.Kotlin.ktor))
|
|
|
|
api(ktor("network", Versions.Kotlin.ktor))
|
2020-05-06 14:40:53 +08:00
|
|
|
|
|
|
|
api("com.github.ajalt:clikt:2.6.0")
|
|
|
|
|
|
|
|
testApi(kotlin("stdlib", Versions.Kotlin.stdlib))
|
|
|
|
testApi(kotlin("test-junit5"))
|
2020-03-05 17:29:12 +08:00
|
|
|
}
|
|
|
|
|
2020-03-24 18:02:19 +08:00
|
|
|
version = Versions.Mirai.consoleWrapper
|
2020-03-05 17:29:12 +08:00
|
|
|
|
2020-05-06 14:40:53 +08:00
|
|
|
description = "Console with plugin support for mirai"
|
|
|
|
|
|
|
|
|
|
|
|
val compileKotlin: org.jetbrains.kotlin.gradle.tasks.KotlinCompile by tasks
|
|
|
|
compileKotlin.kotlinOptions {
|
|
|
|
jvmTarget = "1.8"
|
|
|
|
}
|
|
|
|
val compileTestKotlin: org.jetbrains.kotlin.gradle.tasks.KotlinCompile by tasks
|
|
|
|
compileTestKotlin.kotlinOptions {
|
|
|
|
jvmTarget = "1.8"
|
|
|
|
}
|
|
|
|
java {
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
}
|
|
|
|
tasks.withType(JavaCompile::class.java) {
|
|
|
|
options.encoding = "UTF8"
|
|
|
|
}
|