Skip to content

Commit e53add8

Browse files
committed
IJI-1751 Parametrise Maven publication Space URL
1 parent 54b926f commit e53add8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

buildSrc/src/main/kotlin/Publishing.kt

+4-3
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ fun MavenPom.configureMavenCentralMetadata(project: Project) {
5050
*/
5151
private val spacePublicationEnabled = System.getenv("libs.space.pub")?.equals("true") ?: false
5252

53-
fun mavenRepositoryUri(): URI {
53+
fun Project.mavenRepositoryUri(): URI {
5454
if (spacePublicationEnabled) {
55-
return URI("https://maven.pkg.jetbrains.space/public/p/kotlinx-coroutines/maven")
55+
val spaceRepoUrl = getSensitiveProperty("libs.space.url")
56+
return URI(spaceRepoUrl ?: "https://maven.pkg.jetbrains.space/public/p/kotlinx-coroutines/maven")
5657
}
5758

5859
val repositoryId: String? = System.getenv("libs.repository.id")
@@ -65,7 +66,7 @@ fun mavenRepositoryUri(): URI {
6566

6667
fun configureMavenPublication(rh: RepositoryHandler, project: Project) {
6768
rh.maven {
68-
url = mavenRepositoryUri()
69+
url = project.mavenRepositoryUri()
6970
credentials {
7071
if (spacePublicationEnabled) {
7172
// Configure space credentials

0 commit comments

Comments
 (0)