mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-06 17:10:48 +08:00
Catch exceptions thrown in settings
This commit is contained in:
parent
3ab0e67516
commit
59e2ed85d3
@ -21,15 +21,19 @@ pluginManagement {
|
||||
|
||||
rootProject.name = 'mirai'
|
||||
|
||||
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")
|
||||
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()
|
||||
}
|
||||
|
||||
include(':mirai-core')
|
||||
|
Loading…
Reference in New Issue
Block a user