test build 2

This commit is contained in:
hexated 2023-04-22 15:40:55 +07:00
parent fcbf3f907f
commit 5f7dd3d476
2 changed files with 12 additions and 3 deletions

View File

@ -5,10 +5,11 @@ version = 122
android {
defaultConfig {
val properties = Properties()
properties.load(project.rootProject.file("local.properties").inputStream())
// val properties = Properties()
// properties.load(project.rootProject.file("local.properties").inputStream())
//
// buildConfigField("String", "SORA_API", "\"${properties.getProperty("SORA_API")}\"")
buildConfigField("String", "SORA_API", "\"${properties.getProperty("SORA_API")}\"")
}
}

View File

@ -42,6 +42,13 @@ subprojects {
authors = listOf("Hexated")
}
fun getApiKey(key: String): String {
val propFile = rootProject.file("./local.properties")
val properties = java.util.Properties()
properties.load(java.io.FileInputStream(propFile))
return properties.getProperty(key)
}
android {
compileSdkVersion(33)
@ -53,6 +60,7 @@ subprojects {
// properties.load(project.rootProject.file("local.properties").inputStream())
//
// buildConfigField("String", "LOKLOK_API", "\"${properties.getProperty("LOKLOK_API")}\"")
buildConfigField("String", "SORA_API", "\"${getApiKey("SORA_API")}\"")
}