forked from project-mirai/mirai-demos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.gradle
41 lines (36 loc) · 1.46 KB
/
settings.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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 {
mavenLocal()
jcenter()
google()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://dl.bintray.com/jetbrains/kotlin-native-dependencies" }
}
}
rootProject.name = 'mirai-demos'
include(':mirai-demo-java')
include(':mirai-demo-kotlin')
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-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()
}
enableFeaturePreview('GRADLE_METADATA')