diff --git a/plugins/package-managers/cocoapods/src/main/kotlin/CocoaPods.kt b/plugins/package-managers/cocoapods/src/main/kotlin/CocoaPods.kt index e69284367a98b..89ca744e10a62 100644 --- a/plugins/package-managers/cocoapods/src/main/kotlin/CocoaPods.kt +++ b/plugins/package-managers/cocoapods/src/main/kotlin/CocoaPods.kt @@ -177,7 +177,7 @@ class CocoaPods( return Package( id = id, authors = emptySet(), - declaredLicenses = podspec.license.takeUnless { it.isEmpty() }?.let { setOf(it) }.orEmpty(), + declaredLicenses = setOfNotNull(podspec.license.takeUnless { it.isEmpty() }), description = podspec.summary, homepageUrl = podspec.homepage, binaryArtifact = RemoteArtifact.EMPTY, diff --git a/plugins/package-managers/conan/src/main/kotlin/Conan.kt b/plugins/package-managers/conan/src/main/kotlin/Conan.kt index 93f5e8204f5e9..ef37e6e0c546e 100644 --- a/plugins/package-managers/conan/src/main/kotlin/Conan.kt +++ b/plugins/package-managers/conan/src/main/kotlin/Conan.kt @@ -488,5 +488,5 @@ class Conan( * author name; otherwise, return an empty set. */ private fun parseAuthors(node: JsonNode): Set = - parseAuthorString(node["author"]?.textValue(), '<', '(')?.let { setOf(it) }.orEmpty() + setOfNotNull(parseAuthorString(node["author"]?.textValue(), '<', '(')) } diff --git a/plugins/package-managers/stack/src/main/kotlin/Stack.kt b/plugins/package-managers/stack/src/main/kotlin/Stack.kt index 97b7dbf56c9f8..778f0c193e05d 100644 --- a/plugins/package-managers/stack/src/main/kotlin/Stack.kt +++ b/plugins/package-managers/stack/src/main/kotlin/Stack.kt @@ -347,7 +347,7 @@ class Stack( .map(String::trim) .filter(String::isNotEmpty) .mapNotNullTo(mutableSetOf(), ::parseAuthorString), - declaredLicenses = map["license"]?.let { setOf(it) }.orEmpty(), + declaredLicenses = setOfNotNull(map["license"]), description = map["description"].orEmpty(), homepageUrl = homepageUrl, binaryArtifact = RemoteArtifact.EMPTY,