settings.gradle.kts 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright 2019-2021 Mamoe Technologies and contributors.
  3. *
  4. * 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
  5. * Use of this source code is governed by the GNU AGPLv3 license that can be found through the following link.
  6. *
  7. * https://github.com/mamoe/mirai/blob/master/LICENSE
  8. */
  9. import org.gradle.api.JavaVersion
  10. pluginManagement {
  11. repositories {
  12. mavenLocal()
  13. gradlePluginPortal()
  14. jcenter()
  15. mavenCentral()
  16. }
  17. }
  18. rootProject.name = "mirai-console"
  19. val disableOldFrontEnds = true
  20. fun includeProject(projectPath: String, path: String? = null) {
  21. include(projectPath)
  22. if (path != null) project(projectPath).projectDir = file(path)
  23. }
  24. includeProject(":mirai-console-compiler-annotations", "tools/compiler-annotations")
  25. includeProject(":mirai-console", "backend/mirai-console")
  26. includeProject(":mirai-console.codegen", "backend/codegen")
  27. includeProject(":mirai-console-terminal", "frontend/mirai-console-terminal")
  28. includeProject(":mirai-console-compiler-common", "tools/compiler-common")
  29. includeProject(":mirai-console-intellij", "tools/intellij-plugin")
  30. includeProject(":mirai-console-gradle", "tools/gradle-plugin")
  31. @Suppress("ConstantConditionIf")
  32. if (!disableOldFrontEnds) {
  33. includeProject(":mirai-console-terminal", "frontend/mirai-console-terminal")
  34. println("JDK version: ${JavaVersion.current()}")
  35. if (JavaVersion.current() >= JavaVersion.VERSION_1_9) {
  36. includeProject(":mirai-console-graphical", "frontend/mirai-console-graphical")
  37. } else {
  38. println("当前使用的 JDK 版本为 ${System.getProperty("java.version")}, 请使用 JDK 9 以上版本引入模块 `:mirai-console-graphical`\n")
  39. }
  40. }
  41. enableFeaturePreview("GRADLE_METADATA")