mirai/settings.gradle

52 lines
1.8 KiB
Groovy
Raw Normal View History

2019-11-23 22:34:57 +08:00
pluginManagement {
resolutionStrategy {
eachPlugin {
switch (requested.id.id) {
case "org.jetbrains.kotlin.multiplatform": useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:${requested.version}"); break
case "com.android.library": useModule("com.android.tools.build:gradle:${requested.version}"); break
case "com.jfrog.bintray": useModule("com.jfrog.bintray.gradle:gradle-bintray-plugin:${requested.version}")
}
}
}
repositories {
2019-12-07 00:33:44 +08:00
mavenLocal()
2019-11-29 21:38:02 +08:00
jcenter()
2019-11-23 22:34:57 +08:00
google()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies" }
}
}
2019-10-03 19:07:03 +08:00
rootProject.name = 'mirai'
2019-10-30 23:00:29 +08:00
2019-10-03 19:07:03 +08:00
include(':mirai-core')
2020-02-02 23:20:34 +08:00
//include(':mirai-core-timpc')
2019-12-23 19:31:13 +08:00
include(':mirai-core-qqandroid')
2019-10-30 23:00:29 +08:00
2019-12-02 17:57:14 +08:00
//include(':mirai-api')
2019-11-21 21:31:05 +08:00
include(':mirai-api-http')
//include(':mirai-plugins')
//include(':mirai-plugins:image-sender')
2020-02-18 11:45:57 +08:00
try{
def javaVersion = System.getProperty("java.version")
def versionPos = javaVersion.indexOf(".")
if (versionPos==-1) versionPos = javaVersion.indexOf("-")
if (versionPos==-1){
println("jdk version unknown")
}else{
def javaVersionNum = javaVersion.substring(0, versionPos).toInteger()
if (javaVersionNum >= 11) {
println("jdk版本为 "+ javaVersionNum)
include(':mirai-console-graphical')
} else {
2020-02-18 12:10:38 +08:00
println("当前使用的 JDK 版本为 ${System.getProperty("java.version")}, 最低需要 JDK 11 才能引入模块 `:mirai-console-graphical`")
2020-02-18 11:45:57 +08:00
}
}
2020-02-18 11:45:57 +08:00
}catch(Exception ignored){
2020-02-18 12:10:38 +08:00
println("无法确定 JDK 版本, 将不会引入 `:mirai-console-graphical`")
2020-02-18 11:45:57 +08:00
}
2019-10-19 13:41:36 +08:00
2019-11-06 21:22:23 +08:00
enableFeaturePreview('GRADLE_METADATA')