Skip to content

Commit

Permalink
Merge pull request #33 from syxc/dev
Browse files Browse the repository at this point in the history
Update build.gradle.kts
  • Loading branch information
syxc authored Jun 18, 2024
2 parents ef0f472 + 76d68e9 commit 49efa2e
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions androidApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@ android {
}
}

val propertyFile = project.rootProject.file("keystore.properties")
val propertyFile by lazy { project.rootProject.file("keystore.properties") }
val currentSigning = if (propertyFile.exists() && propertyFile.canRead()) {
val properties = Properties().apply {
propertyFile.inputStream().use { load(it) }
}
if (file(properties["storeFile"] as String).canRead()) {
val properties = Properties().apply { propertyFile.inputStream().use { load(it) } }
val currentStoreFile by lazy { file(properties.getProperty("storeFile")) }
if (currentStoreFile.exists() && currentStoreFile.canRead()) {
signingConfigs.create("release") {
storeFile = file(properties["storeFile"] as String)
storePassword = properties["storePassword"] as String
keyAlias = properties["keyAlias"] as String
keyPassword = properties["keyPassword"] as String
storeFile = currentStoreFile
storePassword = properties.getProperty("storePassword")
keyAlias = properties.getProperty("keyAlias")
keyPassword = properties.getProperty("keyPassword")
}
} else {
println("Oops,storeFile can't read!")
println("Oops, storeFile can't be read!")
signingConfigs.getByName("debug")
}
} else {
println("Oops, keystore.properties can't be read!")
signingConfigs.getByName("debug")
}

Expand Down

0 comments on commit 49efa2e

Please sign in to comment.