From 89a78a02d46734a54fa8d06a895a0d5bba2a4417 Mon Sep 17 00:00:00 2001 From: Alexander Likhachev Date: Tue, 9 Feb 2021 21:36:24 +0300 Subject: [PATCH] [Build] Make generatePom tasks compatible with configuration cache Relates to #KT-44611 --- buildSrc/src/main/kotlin/pluginMarkers.kt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/buildSrc/src/main/kotlin/pluginMarkers.kt b/buildSrc/src/main/kotlin/pluginMarkers.kt index 41bf7e5477e..31eb727a075 100644 --- a/buildSrc/src/main/kotlin/pluginMarkers.kt +++ b/buildSrc/src/main/kotlin/pluginMarkers.kt @@ -64,6 +64,9 @@ private fun createMavenMarkerPublication( ): MavenPublication { return publications.create(declaration.name.toString() + "PluginMarkerMaven") { val pluginId: String = declaration.id + val cGroupId = coordinates.groupId + val cArtifactId = coordinates.artifactId + val cVersion = coordinates.version artifactId = pluginId + PLUGIN_MARKER_SUFFIX groupId = pluginId pom.withXml { @@ -72,11 +75,11 @@ private fun createMavenMarkerPublication( val dependencies = root.appendChild(document.createElement("dependencies")) val dependency = dependencies.appendChild(document.createElement("dependency")) val groupId = dependency.appendChild(document.createElement("groupId")) - groupId.textContent = coordinates.groupId + groupId.textContent = cGroupId val artifactId = dependency.appendChild(document.createElement("artifactId")) - artifactId.textContent = coordinates.artifactId + artifactId.textContent = cArtifactId val version = dependency.appendChild(document.createElement("version")) - version.textContent = coordinates.version + version.textContent = cVersion } pom.name.set(declaration.displayName)