mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-05 05:14:43 +08:00
[build] Fix build when local.properties
not found
This commit is contained in:
parent
f87c142a69
commit
eb892da093
@ -31,7 +31,7 @@ private lateinit var localProperties: Properties
|
||||
private fun Project.loadLocalPropertiesIfAbsent() {
|
||||
if (::localProperties.isInitialized) return
|
||||
localProperties = Properties().apply {
|
||||
rootProject.projectDir.resolve("local.properties").bufferedReader().use {
|
||||
rootProject.projectDir.resolve("local.properties").takeIf { it.exists() }?.bufferedReader()?.use {
|
||||
load(it)
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ rootProject.name = "mirai"
|
||||
|
||||
|
||||
val localProperties = Properties().apply {
|
||||
rootProject.projectDir.resolve("local.properties").bufferedReader().use {
|
||||
rootProject.projectDir.resolve("local.properties").takeIf { it.exists() }?.bufferedReader()?.use {
|
||||
load(it)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user