Skip to content

Commit d084312

Browse files
committed
KTOR-4109 Release 2.0.0-rc-1
1 parent 7cbfefd commit d084312

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

buildSrc/src/main/kotlin/Publication.kt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import org.gradle.api.publish.maven.tasks.*
99
import org.gradle.jvm.tasks.*
1010
import org.gradle.kotlin.dsl.*
1111
import org.gradle.plugins.signing.*
12+
import java.util.concurrent.locks.ReentrantLock
1213

1314
fun isAvailableForPublication(publication: Publication): Boolean {
1415
val name = publication.name
@@ -61,7 +62,12 @@ fun Project.configurePublication() {
6162

6263
val publishingUser: String? = System.getenv("PUBLISHING_USER")
6364
val publishingPassword: String? = System.getenv("PUBLISHING_PASSWORD")
64-
val publishingUrl: String? = System.getenv("PUBLISHING_URL")
65+
66+
val repositoryId: String? = System.getenv("REPOSITORY_ID")
67+
val publishingUrl: String? = if (repositoryId?.isNotBlank() == true) {
68+
println("Set publishing to repository $repositoryId")
69+
"https://oss.sonatype.org/service/local/staging/deployByRepositoryId/$repositoryId"
70+
} else System.getenv("PUBLISHING_URL")
6571

6672
val publishLocal: Boolean by rootProject.extra
6773
val globalM2: String by rootProject.extra
@@ -165,5 +171,17 @@ fun Project.configurePublication() {
165171

166172
sign(the<PublishingExtension>().publications)
167173
}
174+
175+
val gpgAgentLock: ReentrantLock by rootProject.extra { ReentrantLock() }
176+
177+
tasks.withType<Sign> {
178+
doFirst {
179+
gpgAgentLock.lock()
180+
}
181+
182+
doLast {
183+
gpgAgentLock.unlock()
184+
}
185+
}
168186
}
169187
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
kotlin.code.style=official
77

88
# config
9-
version=2.0.0-SNAPSHOT
9+
version=2.0.0-rc-1
1010
kotlin.incremental.js=true
1111
kotlin.incremental.multiplatform=true
1212
kotlin.native.ignoreIncorrectDependencies=true

0 commit comments

Comments
 (0)