File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 1
1
import kotlinx.kover.gradle.plugin.dsl.MetricType
2
+ import kotlinx.validation.build.publishingRepository
2
3
import kotlinx.validation.build.mavenCentralMetadata
3
- import kotlinx.validation.build.mavenRepositoryPublishing
4
4
import kotlinx.validation.build.signPublicationIfKeyPresent
5
5
import org.gradle.api.attributes.TestSuiteType.FUNCTIONAL_TEST
6
6
import org.jetbrains.dokka.gradle.DokkaTask
@@ -125,8 +125,8 @@ publishing {
125
125
create<MavenPublication >(" maven" ) {
126
126
from(components[" java" ])
127
127
}
128
+ publishingRepository(project)
128
129
129
- mavenRepositoryPublishing(project)
130
130
mavenCentralMetadata()
131
131
}
132
132
Original file line number Diff line number Diff line change @@ -11,13 +11,15 @@ import org.gradle.api.publish.maven.*
11
11
import org.gradle.plugins.signing.*
12
12
import java.net.*
13
13
14
- fun PublishingExtension.mavenRepositoryPublishing (project : Project ) {
14
+ // Artifacts are published to an intermediate repo (libs.repo.url) first,
15
+ // and then deployed to the central portal.
16
+ fun PublishingExtension.publishingRepository (project : Project ) {
15
17
repositories {
16
18
maven {
17
- url = URI (" https://oss.sonatype.org/service/local/staging/deploy/maven2/ " )
19
+ url = URI (project.getSensitiveProperty( " libs.repo.url " ) ? : error( " libs.repo.url is not set " ) )
18
20
credentials {
19
- username = project.getSensitiveProperty(" libs.sonatype .user" )
20
- password = project.getSensitiveProperty(" libs.sonatype .password" )
21
+ username = project.getSensitiveProperty(" libs.repo .user" )
22
+ password = project.getSensitiveProperty(" libs.repo .password" )
21
23
}
22
24
}
23
25
}
You can’t perform that action at this time.
0 commit comments