File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import org.gradle.api.publish.maven.tasks.*
9
9
import org.gradle.jvm.tasks.*
10
10
import org.gradle.kotlin.dsl.*
11
11
import org.gradle.plugins.signing.*
12
+ import java.util.concurrent.locks.ReentrantLock
12
13
13
14
fun isAvailableForPublication (publication : Publication ): Boolean {
14
15
val name = publication.name
@@ -61,7 +62,12 @@ fun Project.configurePublication() {
61
62
62
63
val publishingUser: String? = System .getenv(" PUBLISHING_USER" )
63
64
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" )
65
71
66
72
val publishLocal: Boolean by rootProject.extra
67
73
val globalM2: String by rootProject.extra
@@ -165,5 +171,17 @@ fun Project.configurePublication() {
165
171
166
172
sign(the<PublishingExtension >().publications)
167
173
}
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
+ }
168
186
}
169
187
}
Original file line number Diff line number Diff line change 6
6
kotlin.code.style =official
7
7
8
8
# config
9
- version =2.0.0-SNAPSHOT
9
+ version =2.0.0-rc-1
10
10
kotlin.incremental.js =true
11
11
kotlin.incremental.multiplatform =true
12
12
kotlin.native.ignoreIncorrectDependencies =true
You can’t perform that action at this time.
0 commit comments