From 8833193349432569fbe7c16292efb2867fb70d9c Mon Sep 17 00:00:00 2001 From: "Alexander.Likhachev" Date: Tue, 30 Jan 2024 11:05:35 +0100 Subject: [PATCH] [Gradle] Fix warnings in GenerateArtifactPodspecTask ^KT-56904 In Progress --- .../targets/native/tasks/GenerateArtifactPodspecTask.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/GenerateArtifactPodspecTask.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/GenerateArtifactPodspecTask.kt index 80b0c8ec56b..6ea586ecd58 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/GenerateArtifactPodspecTask.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/GenerateArtifactPodspecTask.kt @@ -40,7 +40,7 @@ abstract class GenerateArtifactPodspecTask : DefaultTask() { abstract val specName: Property @get:Input - abstract val specVersion: Property + abstract val specVersion: Property @get:OutputDirectory abstract val destinationDir: DirectoryProperty @@ -134,8 +134,8 @@ abstract class GenerateArtifactPodspecTask : DefaultTask() { put(specNameKey, specName.get()) } - if (!attributes.get().containsKey(specVersionKey)) { - specVersion.get()?.let { put(specVersionKey, it) } + if (!attributes.get().containsKey(specVersionKey) && specVersion.isPresent) { + put(specVersionKey, specVersion.get()) } if (vendoredKeys.none { attributes.get().containsKey(it) }) {