mirai/settings.gradle.kts
Karlatemp 8fe2506e75
Terminal (#179)
* Rename ConsolePure to ConsoleTerminal

* Fix the way to close console with Ctrl+C

* Fix windows pipeline error. Fix EndOfFileException

* Add ConsoleExperimentalApi

* Collect imports

* Review

- Change old CLI main deprecation level to ERROR
- Update documents
- Update tasks from pure to terminal

* Fix error in closing console.

* Fix terminal closing and Ctrl+C closing.

* Add console shut-downing status

* Don't invokeOnCompletion when console shut-downing

* Fix Input interrupt

* Ensure active unless console is shut downing

* Change MiraiConsole.isShutDowning to `!job.isActive`

* Code Review

- Update Message on MiraiConsolePureLoader.kt
- Change MiraiConsole.isShutDowning to MiraiConsole.isActive
- Change MiraiConsole.shutdown to ConsoleInternalApi

* run catching

* Fix console input

* Update shutdown

* Fix module

* Revert 5199395

* Typo
2020-09-18 12:43:57 +08:00

46 lines
1.5 KiB
Plaintext

pluginManagement {
repositories {
mavenLocal()
gradlePluginPortal()
jcenter()
maven(url = "https://dl.bintray.com/kotlin/kotlin-eap")
mavenCentral()
}
}
rootProject.name = "mirai-console"
val disableOldFrontEnds = true
fun includeProject(projectPath: String, path: String? = null) {
include(projectPath)
if (path != null) project(projectPath).projectDir = file(path)
}
includeProject(":mirai-console", "backend/mirai-console")
includeProject(":mirai-console.codegen", "backend/codegen")
includeProject(":mirai-console-terminal", "frontend/mirai-console-terminal")
includeProject(":mirai-console-compiler-common", "tools/compiler-common")
includeProject(":mirai-console-intellij", "tools/intellij-plugin")
includeProject(":mirai-console-gradle", "tools/gradle-plugin")
@Suppress("ConstantConditionIf")
if (!disableOldFrontEnds) {
includeProject(":mirai-console-terminal", "frontend/mirai-console-terminal")
val jdkVersion = kotlin.runCatching {
System.getProperty("java.version").let { v ->
v.toIntOrNull() ?: v.removePrefix("1.").substringBefore("-").toIntOrNull()
}
}.getOrNull() ?: -1
println("JDK version: $jdkVersion")
if (jdkVersion >= 9) {
includeProject(":mirai-console-graphical", "frontend/mirai-console-graphical")
} else {
println("当前使用的 JDK 版本为 ${System.getProperty("java.version")}, 请使用 JDK 9 以上版本引入模块 `:mirai-console-graphical`\n")
}
}
enableFeaturePreview("GRADLE_METADATA")