File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
build-logic/src/main/kotlin/kotlinx/kover/conventions Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ abstract class CollectTask: DefaultTask() {
113113
114114publishing {
115115 repositories {
116- addSonatypeRepository ()
116+ addPublishingRepositoryIfPresent ()
117117
118118 /* *
119119 * Maven repository in build directory to store artifacts for using in functional tests.
@@ -142,12 +142,17 @@ afterEvaluate {
142142 }
143143}
144144
145- fun RepositoryHandler.addSonatypeRepository () {
146- maven {
147- url = uri(" https://oss.sonatype.org/service/local/staging/deploy/maven2/" )
148- credentials {
149- username = acquireProperty(" libs.sonatype.user" )
150- password = acquireProperty(" libs.sonatype.password" )
145+ // Artifacts are published to an intermediate repo (libs.repo.url) first,
146+ // and then deployed to the central portal.
147+ fun RepositoryHandler.addPublishingRepositoryIfPresent () {
148+ val repositoryUrl = acquireProperty(" libs.repo.url" )
149+ if (! repositoryUrl.isNullOrBlank()) {
150+ maven {
151+ url = uri(repositoryUrl)
152+ credentials {
153+ username = acquireProperty(" libs.repo.user" )
154+ password = acquireProperty(" libs.repo.password" )
155+ }
151156 }
152157 }
153158}
You can’t perform that action at this time.
0 commit comments