Skip to content

Commit

Permalink
KTOR-4109 Release 2.0.0-rc-1
Browse files Browse the repository at this point in the history
  • Loading branch information
e5l committed Apr 6, 2022
1 parent 7cbfefd commit 1ae2c1f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
23 changes: 22 additions & 1 deletion buildSrc/src/main/kotlin/Publication.kt
Expand Up @@ -9,6 +9,7 @@ import org.gradle.api.publish.maven.tasks.*
import org.gradle.jvm.tasks.*
import org.gradle.kotlin.dsl.*
import org.gradle.plugins.signing.*
import java.util.concurrent.locks.ReentrantLock

fun isAvailableForPublication(publication: Publication): Boolean {
val name = publication.name
Expand Down Expand Up @@ -61,7 +62,15 @@ fun Project.configurePublication() {

val publishingUser: String? = System.getenv("PUBLISHING_USER")
val publishingPassword: String? = System.getenv("PUBLISHING_PASSWORD")
val publishingUrl: String? = System.getenv("PUBLISHING_URL")

val repositoryId: String? = System.getenv("REPOSITORY_ID")
val publishingUrl: String? = if (repositoryId?.isNotBlank() == true) {
println("Set publishing to repository $repositoryId")
"https://oss.sonatype.org/service/local/staging/deployByRepositoryId/$repositoryId"
} else {
println("Publishing to default URL")
System.getenv("PUBLISHING_URL")
}

val publishLocal: Boolean by rootProject.extra
val globalM2: String by rootProject.extra
Expand Down Expand Up @@ -165,5 +174,17 @@ fun Project.configurePublication() {

sign(the<PublishingExtension>().publications)
}

val gpgAgentLock: ReentrantLock by rootProject.extra { ReentrantLock() }

tasks.withType<Sign> {
doFirst {
gpgAgentLock.lock()
}

doLast {
gpgAgentLock.unlock()
}
}
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Expand Up @@ -6,7 +6,7 @@
kotlin.code.style=official

# config
version=2.0.0-SNAPSHOT
version=2.0.0-rc-1
kotlin.incremental.js=true
kotlin.incremental.multiplatform=true
kotlin.native.ignoreIncorrectDependencies=true
Expand Down

0 comments on commit 1ae2c1f

Please sign in to comment.