mirai/settings.gradle.kts

50 lines
1.8 KiB
Plaintext
Raw Normal View History

/*
* Copyright 2019-2021 Mamoe Technologies and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
*
* https://github.com/mamoe/mirai/blob/master/LICENSE
*/
2021-04-07 23:38:50 +08:00
import org.gradle.api.JavaVersion
2020-06-20 22:55:07 +08:00
pluginManagement {
repositories {
2020-06-21 00:44:02 +08:00
mavenLocal()
2020-08-01 21:53:24 +08:00
gradlePluginPortal()
2020-06-20 22:55:07 +08:00
jcenter()
mavenCentral()
}
}
rootProject.name = "mirai-console"
2020-06-21 00:44:02 +08:00
val disableOldFrontEnds = true
2020-06-20 22:55:07 +08:00
2020-06-21 00:44:02 +08:00
fun includeProject(projectPath: String, path: String? = null) {
include(projectPath)
if (path != null) project(projectPath).projectDir = file(path)
}
2020-06-20 22:55:07 +08:00
includeProject(":mirai-console-compiler-annotations", "tools/compiler-annotations")
2020-06-21 00:44:02 +08:00
includeProject(":mirai-console", "backend/mirai-console")
includeProject(":mirai-console.codegen", "backend/codegen")
includeProject(":mirai-console-terminal", "frontend/mirai-console-terminal")
2020-09-17 21:39:34 +08:00
includeProject(":mirai-console-compiler-common", "tools/compiler-common")
includeProject(":mirai-console-intellij", "tools/intellij-plugin")
includeProject(":mirai-console-gradle", "tools/gradle-plugin")
2020-06-20 22:55:07 +08:00
@Suppress("ConstantConditionIf")
2020-06-21 00:44:02 +08:00
if (!disableOldFrontEnds) {
includeProject(":mirai-console-terminal", "frontend/mirai-console-terminal")
2020-06-20 22:55:07 +08:00
2021-04-07 23:38:50 +08:00
println("JDK version: ${JavaVersion.current()}")
2020-06-20 22:55:07 +08:00
2021-04-07 23:38:50 +08:00
if (JavaVersion.current() >= JavaVersion.VERSION_1_9) {
2020-06-21 00:44:02 +08:00
includeProject(":mirai-console-graphical", "frontend/mirai-console-graphical")
} else {
println("当前使用的 JDK 版本为 ${System.getProperty("java.version")}, 请使用 JDK 9 以上版本引入模块 `:mirai-console-graphical`\n")
2020-06-20 22:55:07 +08:00
}
}
enableFeaturePreview("GRADLE_METADATA")