mirai/settings.gradle

72 lines
2.7 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
2020-02-12 23:30:28 +08:00
try {
def keyProps = new Properties()
def keyFile = file("local.properties")
if (keyFile.exists()) keyFile.withInputStream { keyProps.load(it) }
if (!keyProps.getProperty("sdk.dir", "").isEmpty()) {
include(':mirai-demos:mirai-demo-android')
project(':mirai-demos:mirai-demo-android').projectDir = file('mirai-demos/mirai-demo-android')
} else {
println("Android SDK 可能未安装. \n将不会加载模块 `mirai-demo-android`, 但这并不影响其他 demo 的加载 ")
println("Android SDK might not be installed. \nModule `mirai-demo-android` will not be included, but other demos will not be influenced")
}
} catch (Exception e) {
e.printStackTrace()
2020-01-05 17:38:46 +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-06 20:50:01 +08:00
include(':mirai-japt')
2019-10-03 19:07:03 +08:00
include(':mirai-console')
2019-12-02 17:57:14 +08:00
//include(':mirai-api')
2019-11-21 21:31:05 +08:00
include(':mirai-api-http')
2019-10-03 19:07:03 +08:00
include(':mirai-demos:mirai-demo-1')
2019-10-26 17:06:40 +08:00
include(':mirai-demos:mirai-demo-gentleman')
2019-10-03 19:07:03 +08:00
include(':mirai-demos')
2020-01-18 21:35:20 +08:00
include(':mirai-plugins')
include(':mirai-plugins:image-sender')
2019-11-18 13:52:31 +08:00
def javaVersion = System.getProperty("java.version")
2020-02-13 00:06:03 +08:00
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-debug')
} else {
println("当前使用的 JDK 版本为 ${System.getProperty("java.version")}, 最低需要 JDK 11 才能引入模块 `:mirai-debug`")
}
2019-11-18 13:52:31 +08:00
}
2019-10-19 13:41:36 +08:00
project(':mirai-demos:mirai-demo-1').projectDir = file('mirai-demos/mirai-demo-1')
2019-10-26 17:06:40 +08:00
project(':mirai-demos:mirai-demo-gentleman').projectDir = file('mirai-demos/mirai-demo-gentleman')
2020-01-18 21:35:20 +08:00
project(':mirai-plugins:image-sender').projectDir = file('mirai-plugins/image-sender')
2019-10-19 13:41:36 +08:00
2019-11-06 21:22:23 +08:00
enableFeaturePreview('GRADLE_METADATA')