Skip to content

Commit

Permalink
Fix build making the local.properties values optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Dion Segijn committed Dec 2, 2023
1 parent e8ac73c commit fe898d9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ if(properties.exists()) {
nexusPublishing {
repositories {
sonatype {
stagingProfileId.set(localProperties["sonatypeStagingProfileId"] as String)
username.set(localProperties["ossrhUsername"] as String)
password.set(localProperties["ossrhPassword"] as String)
stagingProfileId.set(localProperties["sonatypeStagingProfileId"] as String?)
username.set(localProperties["ossrhUsername"] as String?)
password.set(localProperties["ossrhPassword"] as String?)
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions scripts/publish-module.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ afterEvaluate {
val localProperties = properties.inputStream().use {
java.util.Properties().apply { load(it) }
}
val signingKeyId: String? = localProperties.getValue("signing.keyId") as String
val signingKey: String? = localProperties.getValue("signing.key") as String
val signingPassword: String? = localProperties.getValue("signing.password") as String
val signingKeyId: String? = localProperties.getOrDefault("signing.keyId", null) as String?
val signingKey: String? = localProperties.getOrDefault("signing.key", null) as String?
val signingPassword: String? = localProperties.getOrDefault("signing.password", null) as String?
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
}

Expand Down

0 comments on commit fe898d9

Please sign in to comment.