2020-05-14 08:18:03 +08:00
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
|
|
|
|
|
|
plugins {
|
2020-06-20 22:57:37 +08:00
|
|
|
kotlin("jvm") version Versions.kotlin
|
|
|
|
kotlin("plugin.serialization") version Versions.kotlin
|
2020-05-14 08:18:03 +08:00
|
|
|
id("java")
|
|
|
|
`maven-publish`
|
2020-06-20 22:57:37 +08:00
|
|
|
id("com.jfrog.bintray") version Versions.bintray
|
2020-05-14 08:18:03 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
kotlin {
|
|
|
|
sourceSets {
|
|
|
|
all {
|
|
|
|
languageSettings.enableLanguageFeature("InlineClasses")
|
|
|
|
|
|
|
|
languageSettings.useExperimentalAnnotation("kotlin.Experimental")
|
|
|
|
languageSettings.useExperimentalAnnotation("kotlin.OptIn")
|
|
|
|
languageSettings.progressiveMode = true
|
|
|
|
languageSettings.useExperimentalAnnotation("net.mamoe.mirai.utils.MiraiInternalAPI")
|
|
|
|
languageSettings.useExperimentalAnnotation("kotlin.ExperimentalUnsignedTypes")
|
|
|
|
languageSettings.useExperimentalAnnotation("kotlin.experimental.ExperimentalTypeInference")
|
|
|
|
languageSettings.useExperimentalAnnotation("kotlin.contracts.ExperimentalContracts")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-06-20 20:46:20 +08:00
|
|
|
|
|
|
|
var debugging = true
|
|
|
|
|
2020-05-14 08:18:03 +08:00
|
|
|
dependencies {
|
2020-06-20 20:46:20 +08:00
|
|
|
fun import0(dep: Any) {
|
|
|
|
if (debugging) {
|
|
|
|
implementation(dep)
|
|
|
|
} else {
|
|
|
|
compileOnly(dep)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
import0("org.jline:jline:3.15.0")
|
|
|
|
import0("org.fusesource.jansi:jansi:1.18")
|
|
|
|
|
|
|
|
import0(project(":mirai-console"))
|
2020-06-20 22:57:37 +08:00
|
|
|
import0("net.mamoe:mirai-core:${Versions.core}")
|
2020-06-20 20:46:20 +08:00
|
|
|
import0(kotlin("stdlib")) // embedded by core
|
2020-05-14 08:18:03 +08:00
|
|
|
|
2020-06-20 22:55:07 +08:00
|
|
|
testApi("net.mamoe:mirai-core-qqandroid:${Versions.core}")
|
2020-05-14 08:18:03 +08:00
|
|
|
testApi(project(":mirai-console"))
|
|
|
|
}
|
|
|
|
|
|
|
|
version = Versions.Mirai.consolePure
|
|
|
|
|
|
|
|
description = "Console Pure CLI frontend for mirai"
|
|
|
|
|
|
|
|
val compileKotlin: KotlinCompile by tasks
|
|
|
|
compileKotlin.kotlinOptions {
|
|
|
|
jvmTarget = "1.8"
|
|
|
|
}
|
|
|
|
val compileTestKotlin: 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"
|
|
|
|
}
|