From 9b9bec483f39a33b753e5850364a4787effece71 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Thu, 30 Nov 2023 11:19:33 +0100 Subject: [PATCH] Move configuration of an artifact ID to an afterEvaluate phase. (#3995) More info: https://youtrack.jetbrains.com/issue/KT-53520 --- .../buildSrc/src/main/kotlin/CommonMavenProperties.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/components/buildSrc/src/main/kotlin/CommonMavenProperties.kt b/components/buildSrc/src/main/kotlin/CommonMavenProperties.kt index 311bd0f8cf..35d6ccb496 100644 --- a/components/buildSrc/src/main/kotlin/CommonMavenProperties.kt +++ b/components/buildSrc/src/main/kotlin/CommonMavenProperties.kt @@ -11,10 +11,14 @@ fun Project.configureMavenPublication( extensions.configure { publications { all { - this as MavenPublication + val publication = this as MavenPublication - this.groupId = groupId - mppArtifactId = artifactId + //work around to fix an android publication artifact ID + //https://youtrack.jetbrains.com/issue/KT-53520 + afterEvaluate { + publication.groupId = groupId + publication.mppArtifactId = artifactId + } pom { this.name.set(name)