Catch exceptions thrown in settings

This commit is contained in:
Him188 2020-02-12 23:30:28 +08:00
parent 3ab0e67516
commit 59e2ed85d3

View File

@ -21,6 +21,7 @@ pluginManagement {
rootProject.name = 'mirai'
try {
def keyProps = new Properties()
def keyFile = file("local.properties")
if (keyFile.exists()) keyFile.withInputStream { keyProps.load(it) }
@ -31,6 +32,9 @@ if (!keyProps.getProperty("sdk.dir", "").isEmpty()) {
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-timpc')