Commit 59e2ed85 authored by Him188's avatar Him188

Catch exceptions thrown in settings

parent 3ab0e675
...@@ -21,15 +21,19 @@ pluginManagement { ...@@ -21,15 +21,19 @@ pluginManagement {
rootProject.name = 'mirai' rootProject.name = 'mirai'
def keyProps = new Properties() try {
def keyFile = file("local.properties") def keyProps = new Properties()
if (keyFile.exists()) keyFile.withInputStream { keyProps.load(it) } def keyFile = file("local.properties")
if (!keyProps.getProperty("sdk.dir", "").isEmpty()) { if (keyFile.exists()) keyFile.withInputStream { keyProps.load(it) }
include(':mirai-demos:mirai-demo-android') if (!keyProps.getProperty("sdk.dir", "").isEmpty()) {
project(':mirai-demos:mirai-demo-android').projectDir = file('mirai-demos/mirai-demo-android') include(':mirai-demos:mirai-demo-android')
} else { project(':mirai-demos:mirai-demo-android').projectDir = file('mirai-demos/mirai-demo-android')
println("Android SDK 可能未安装. \n将不会加载模块 `mirai-demo-android`, 但这并不影响其他 demo 的加载 ") } else {
println("Android SDK might not be installed. \nModule `mirai-demo-android` will not be included, but other demos will not be influenced") 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()
} }
include(':mirai-core') include(':mirai-core')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment