Skip to content

Commit

Permalink
Update buildscript
Browse files Browse the repository at this point in the history
  • Loading branch information
huanmeng-qwq committed Jan 10, 2025
1 parent 5f62bea commit c00bd7d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions buildSrc/src/main/kotlin/publish-conventions.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ val cleanUpload by tasks.creating(Delete::class) {

tasks.sonatypeCentralUpload {
// gradle sonatypeCentralUpload -PCENTRAL_USERNAME=<username> -PCENTRAL_PASSWORD=<password> -PCENTRAL_PRIVATE_KEY=<privateKey> -PCENTRAL_PRIVATE_KEY_PWD=<privateKeyPwd> -PCENTRAL_PUBLIC_KEY=<publicKey>
val centralUsername = read(System.getenv("MAVEN_USERNAME") ?: findProperty("CENTRAL_USERNAME")?.toString())
val centralPassword = read(System.getenv("MAVEN_PASSWORD") ?: findProperty("CENTRAL_PASSWORD")?.toString())
val privateKey = read(System.getenv("MAVEN_PRIVATE_KEY") ?: findProperty("CENTRAL_PRIVATE_KEY")?.toString())
val privateKeyPwd = read(System.getenv("MAVEN_PRIVATE_KEY_PWD") ?: findProperty("CENTRAL_PRIVATE_KEY_PWD")?.toString())
val publicKey = read(System.getenv("MAVEN_PUBLIC_KEY") ?: findProperty("CENTRAL_PUBLIC_KEY")?.toString())
val centralUsername = read(System.getenv("CENTRAL_USERNAME") ?: findProperty("CENTRAL_USERNAME")?.toString())
val centralPassword = read(System.getenv("CENTRAL_PASSWORD") ?: findProperty("CENTRAL_PASSWORD")?.toString())
val privateKey = read(System.getenv("CENTRAL_PRIVATE_KEY") ?: findProperty("CENTRAL_PRIVATE_KEY")?.toString())
val privateKeyPwd = read(System.getenv("CENTRAL_PRIVATE_KEY_PWD") ?: findProperty("CENTRAL_PRIVATE_KEY_PWD")?.toString())
val publicKey = read(System.getenv("CENTRAL_PUBLIC_KEY") ?: findProperty("CENTRAL_PUBLIC_KEY")?.toString())
dependsOn(tasks.build, tasks.generatePomFileForMavenPublication, cleanUpload)
this.username = centralUsername
this.password = centralPassword
Expand Down

0 comments on commit c00bd7d

Please sign in to comment.