Feature: Add workflow for push/PR checking (#1030)

* Chore: downgrade ndk version

* Fix: fix local.properties load

* Feature: add workflow for push/PR checking
This commit is contained in:
Kr328 committed 2021-05-24 16:15:06 +08:00
1 parent 1a36218c80
commit 4f05ba1ac6
3 files changed
+38 -7

No files matched your search

+13 -6
View File
@@ -48,13 +48,20 @@ android {
versionNameSuffix = ".premium"
if (buildFlavor == "premium") {
val appCenterKey = rootProject.file("local.properties").inputStream()
.use { Properties().apply { load(it) } }
.getProperty("appcenter.key", null)
val localFile = rootProject.file("local.properties")
if (localFile.exists()) {
val appCenterKey = localFile.inputStream()
.use { Properties().apply { load(it) } }
.getProperty("appcenter.key", null)
Objects.requireNonNull(appCenterKey)
buildConfigField("String", "APP_CENTER_KEY", "\"$appCenterKey\"")
if (appCenterKey != null) {
buildConfigField("String", "APP_CENTER_KEY", "\"$appCenterKey\"")
} else {
buildConfigField("String", "APP_CENTER_KEY", "null")
}
} else {
buildConfigField("String", "APP_CENTER_KEY", "null")
}
}
}
}