From e22f00f10da95eb584ee88def74a6aa902e93a05 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Fri, 5 Jul 2024 21:18:16 +0200 Subject: [PATCH] WIP variants for each platform - Improve for loops over map values --- src/main/kotlin/io/github/sgtsilvio/gradle/oci/OciPushTask.kt | 2 +- .../sgtsilvio/gradle/oci/internal/dsl/OciImageDefinitionImpl.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/io/github/sgtsilvio/gradle/oci/OciPushTask.kt b/src/main/kotlin/io/github/sgtsilvio/gradle/oci/OciPushTask.kt index da59ef41..4d899a48 100644 --- a/src/main/kotlin/io/github/sgtsilvio/gradle/oci/OciPushTask.kt +++ b/src/main/kotlin/io/github/sgtsilvio/gradle/oci/OciPushTask.kt @@ -110,7 +110,7 @@ abstract class OciPushTask @Inject constructor( for ((imageName, tags) in imageReferences.groupByTo(HashMap(), { it.name }, { it.tag })) { val manifestFutures = mutableListOf>() - for ((_, image) in multiArchImage.platformToImage) { + for (image in multiArchImage.platformToImage.values) { val blobFutures = mutableListOf>() for (variant in image.variants) { for (layer in variant.layers) { diff --git a/src/main/kotlin/io/github/sgtsilvio/gradle/oci/internal/dsl/OciImageDefinitionImpl.kt b/src/main/kotlin/io/github/sgtsilvio/gradle/oci/internal/dsl/OciImageDefinitionImpl.kt index 5700a316..206ed993 100644 --- a/src/main/kotlin/io/github/sgtsilvio/gradle/oci/internal/dsl/OciImageDefinitionImpl.kt +++ b/src/main/kotlin/io/github/sgtsilvio/gradle/oci/internal/dsl/OciImageDefinitionImpl.kt @@ -70,7 +70,7 @@ internal abstract class OciImageDefinitionImpl @Inject constructor( project.afterEvaluate { val platformBundles = platformBundles if (platformBundles != null) { - for ((_, bundle) in platformBundles) { + for (bundle in platformBundles.values) { bundle.onAfterEvaluate() } } else if (universalBundle == null) {