Skip to content

Commit

Permalink
[Gradle] Fix signing config
Browse files Browse the repository at this point in the history
  • Loading branch information
proninyaroslav committed Jan 3, 2024
1 parent 8d958d1 commit 4fa10f8
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,18 @@ android {

signingConfigs {
create("release") {
val keyProperties = File("${rootProject.projectDir}/key.properties").loadProperties()

storeFile = keyProperties["storeFile"]?.let { file(it) }
keyPassword = keyProperties["keyPassword"] as String?
storePassword = keyProperties["storePassword"] as String?
keyAlias = keyProperties["keyAlias"] as String?
val keyProperties = File("${rootProject.projectDir}/key.properties").let {
if (it.exists) {
it.loadProperties()
} else {
null
}
}

storeFile = keyProperties?.getProperty("storeFile")?.let { file(it) }
keyPassword = keyProperties?.getProperty("keyPassword")
storePassword = keyProperties?.getProperty("storePassword")
keyAlias = keyProperties?.getProperty("keyAlias")
}
}

Expand Down

0 comments on commit 4fa10f8

Please sign in to comment.