From 9aba070d3e597298e29fea4233c74cb814adb3f2 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Tue, 16 Jul 2024 23:43:16 +0200 Subject: [PATCH] Change OciImagesTask.run internal -> protected Change internal -> public: OciMultiPlatformImage, OciImage, OciVariant, OciLayer --- .../io/github/sgtsilvio/gradle/oci/OciImagesTask.kt | 10 +++++----- .../sgtsilvio/gradle/oci/metadata/OciDescriptor.kt | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/kotlin/io/github/sgtsilvio/gradle/oci/OciImagesTask.kt b/src/main/kotlin/io/github/sgtsilvio/gradle/oci/OciImagesTask.kt index 33b5fc82..2b7a0057 100644 --- a/src/main/kotlin/io/github/sgtsilvio/gradle/oci/OciImagesTask.kt +++ b/src/main/kotlin/io/github/sgtsilvio/gradle/oci/OciImagesTask.kt @@ -28,12 +28,12 @@ data class OciVariantInput( @get:InputFiles @get:PathSensitive(PathSensitivity.NONE) val layerFiles: List, ) -internal class OciMultiPlatformImage( +class OciMultiPlatformImage( val index: OciData, val platformToImage: Map, ) -internal class OciImage( +class OciImage( val manifest: OciDataDescriptor, val config: OciDataDescriptor, val platform: Platform, @@ -44,12 +44,12 @@ internal class OciImage( } } -internal class OciVariant( +class OciVariant( val metadata: OciMetadata, val layers: List, ) -internal class OciLayer( // TODO internal? +class OciLayer( val descriptor: OciLayerDescriptor, val file: File, ) @@ -77,7 +77,7 @@ abstract class OciImagesTask : DefaultTask() { run(digestToLayerFile, images, multiPlatformImageAndReferencesPairs) } - internal abstract fun run( // TODO internal? protected? + protected abstract fun run( digestToLayerFile: Map, images: List, multiPlatformImageAndReferencesPairs: List>>, diff --git a/src/main/kotlin/io/github/sgtsilvio/gradle/oci/metadata/OciDescriptor.kt b/src/main/kotlin/io/github/sgtsilvio/gradle/oci/metadata/OciDescriptor.kt index 9946452a..84f55b68 100644 --- a/src/main/kotlin/io/github/sgtsilvio/gradle/oci/metadata/OciDescriptor.kt +++ b/src/main/kotlin/io/github/sgtsilvio/gradle/oci/metadata/OciDescriptor.kt @@ -19,7 +19,7 @@ internal class OciDescriptorImpl( override val annotations: SortedMap, ) : OciDescriptor -internal class OciData( +class OciData( val mediaType: String, val bytes: ByteArray, digestAlgorithm: OciDigestAlgorithm, @@ -27,7 +27,7 @@ internal class OciData( val digest = bytes.calculateOciDigest(digestAlgorithm) } -internal class OciDataDescriptor( +class OciDataDescriptor( val data: OciData, override val annotations: SortedMap, ) : OciDescriptor {