Skip to content

Commit

Permalink
Use nullable arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
benedekh committed Aug 30, 2023
1 parent 4aa8216 commit d59a40c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ val javadocJar by tasks.creating(Jar::class) {
}

signing {
val signingKey = (project.findProperty("GPG_SIGNING_KEY") ?: System.getenv("GPG_SIGNING_KEY")) as String
val signingKey = (project.findProperty("GPG_SIGNING_KEY") ?: System.getenv("GPG_SIGNING_KEY")) as String?
val signingPassphrase =
(project.findProperty("GPG_SIGNING_PASSPHRASE") ?: System.getenv("GPG_SIGNING_PASSPHRASE")) as String
(project.findProperty("GPG_SIGNING_PASSPHRASE") ?: System.getenv("GPG_SIGNING_PASSPHRASE")) as String?

useInMemoryPgpKeys(signingKey, signingPassphrase)
val extension = extensions.getByName("publishing") as PublishingExtension
Expand Down Expand Up @@ -126,8 +126,8 @@ nexusPublishing {
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))

val ossrhUsername = (project.findProperty("OSSRH_USERNAME") ?: System.getenv("OSSRH_USERNAME")) as String
val ossrhPassword = (project.findProperty("OSSRH_PASSWORD") ?: System.getenv("OSSRH_PASSWORD")) as String
val ossrhUsername = (project.findProperty("OSSRH_USERNAME") ?: System.getenv("OSSRH_USERNAME")) as String?
val ossrhPassword = (project.findProperty("OSSRH_PASSWORD") ?: System.getenv("OSSRH_PASSWORD")) as String?
username.set(ossrhUsername)
password.set(ossrhPassword)
}
Expand Down

0 comments on commit d59a40c

Please sign in to comment.