2020-02-27 13:18:33 +08:00
|
|
|
plugins {
|
|
|
|
id("kotlinx-serialization")
|
|
|
|
id("kotlin")
|
|
|
|
id("java")
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
apply(plugin = "com.github.johnrengelman.shadow")
|
|
|
|
|
2020-03-24 18:02:19 +08:00
|
|
|
version = Versions.Mirai.console
|
2020-02-27 13:18:33 +08:00
|
|
|
|
2020-05-11 13:17:58 +08:00
|
|
|
tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
|
2020-02-27 13:18:33 +08:00
|
|
|
manifest {
|
|
|
|
attributes["Main-Class"] = "net.mamoe.mirai.console.MiraiConsoleTerminalLoader"
|
|
|
|
}
|
|
|
|
}
|
2020-05-11 13:17:58 +08:00
|
|
|
|
|
|
|
kotlin {
|
|
|
|
sourceSets {
|
|
|
|
all {
|
|
|
|
|
|
|
|
languageSettings.useExperimentalAnnotation("kotlin.Experimental")
|
|
|
|
languageSettings.useExperimentalAnnotation("kotlin.OptIn")
|
|
|
|
languageSettings.progressiveMode = true
|
|
|
|
languageSettings.useExperimentalAnnotation("net.mamoe.mirai.utils.MiraiInternalAPI")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-02-27 13:18:33 +08:00
|
|
|
dependencies {
|
2020-04-02 21:53:44 +08:00
|
|
|
compileOnly("net.mamoe:mirai-core-qqandroid:${Versions.Mirai.core}")
|
2020-02-27 13:18:33 +08:00
|
|
|
api(project(":mirai-console"))
|
|
|
|
api(group = "com.googlecode.lanterna", name = "lanterna", version = "3.0.2")
|
2020-05-11 13:17:58 +08:00
|
|
|
}
|
|
|
|
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"
|
|
|
|
}
|