diff --git a/src/main/kotlin/io/github/sgtsilvio/gradle/oci/internal/registry/OciRepositoryHandler.kt b/src/main/kotlin/io/github/sgtsilvio/gradle/oci/internal/registry/OciRepositoryHandler.kt index 9491660a..b0ca592f 100644 --- a/src/main/kotlin/io/github/sgtsilvio/gradle/oci/internal/registry/OciRepositoryHandler.kt +++ b/src/main/kotlin/io/github/sgtsilvio/gradle/oci/internal/registry/OciRepositoryHandler.kt @@ -372,24 +372,18 @@ private fun JsonObjectStringBuilder.addCapabilities( componentId: VersionedCoordinates, ) { if (capabilities != setOf(componentId)) { - addCapabilities(key, capabilities, "") + addCapabilities(key, capabilities, null) } } private fun JsonObjectStringBuilder.addCapabilities( key: String, capabilities: Set, - platform: Platform, -) = addCapabilities(key, capabilities, createPlatformPostfix(platform)) - -private fun JsonObjectStringBuilder.addCapabilities( - key: String, - capabilities: Set, - featureName: String, + platform: Platform?, ) = addArray(key, capabilities) { capability -> addObject { addString("group", capability.group) - addString("name", capability.name + featureName) + addString("name", capability.name + createPlatformPostfix(platform)) addString("version", capability.version) } }