Skip to content

Commit

Permalink
Fix build when file local.properties doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
kirich1409 committed Feb 7, 2025
1 parent df8cab2 commit a313cdd
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ private fun readProperties(): Properties {
return localProperties
}

val properties = readProperties()
project.extra["signing.keyId"] = properties.getProperty("signing.keyId")
project.extra["signing.secretKeyRingFile"] = properties.getProperty("signing.secretKeyRingFile")
project.extra["signing.password"] = properties.getProperty("signing.password")
if (project.rootProject.file("local.properties").exists()) {
val properties = readProperties()
project.extra["signing.keyId"] = properties.getProperty("signing.keyId")
project.extra["signing.secretKeyRingFile"] = properties.getProperty("signing.secretKeyRingFile")
project.extra["signing.password"] = properties.getProperty("signing.password")

project.extra["mavenCentralUsername"] = properties.getProperty("mavenCentralUsername")
project.extra["mavenCentralPassword"] = properties.getProperty("mavenCentralPassword")
project.extra["mavenCentralUsername"] = properties.getProperty("mavenCentralUsername")
project.extra["mavenCentralPassword"] = properties.getProperty("mavenCentralPassword")
}

mavenPublishingConfig {
publications {
Expand Down

0 comments on commit a313cdd

Please sign in to comment.