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 11import kotlinx.kover.gradle.plugin.dsl.MetricType
2+ import kotlinx.validation.build.publishingRepository
23import kotlinx.validation.build.mavenCentralMetadata
3- import kotlinx.validation.build.mavenRepositoryPublishing
44import kotlinx.validation.build.signPublicationIfKeyPresent
55import org.gradle.api.attributes.TestSuiteType.FUNCTIONAL_TEST
66import org.jetbrains.dokka.gradle.DokkaTask
@@ -125,8 +125,8 @@ publishing {
125125 create<MavenPublication >(" maven" ) {
126126 from(components[" java" ])
127127 }
128+ publishingRepository(project)
128129
129- mavenRepositoryPublishing(project)
130130 mavenCentralMetadata()
131131 }
132132
Original file line number Diff line number Diff line change @@ -11,13 +11,15 @@ import org.gradle.api.publish.maven.*
1111import org.gradle.plugins.signing.*
1212import java.net.*
1313
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 ) {
1517 repositories {
1618 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 " ) )
1820 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" )
2123 }
2224 }
2325 }
You can’t perform that action at this time.
0 commit comments