Skip to content

Commit

Permalink
Change OciImagesTask.run internal -> protected
Browse files Browse the repository at this point in the history
Change internal -> public: OciMultiPlatformImage, OciImage, OciVariant, OciLayer
  • Loading branch information
SgtSilvio committed Jul 16, 2024
1 parent 43c5cfa commit 9aba070
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/main/kotlin/io/github/sgtsilvio/gradle/oci/OciImagesTask.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ data class OciVariantInput(
@get:InputFiles @get:PathSensitive(PathSensitivity.NONE) val layerFiles: List<File>,
)

internal class OciMultiPlatformImage(
class OciMultiPlatformImage(
val index: OciData,
val platformToImage: Map<Platform, OciImage>,
)

internal class OciImage(
class OciImage(
val manifest: OciDataDescriptor,
val config: OciDataDescriptor,
val platform: Platform,
Expand All @@ -44,12 +44,12 @@ internal class OciImage(
}
}

internal class OciVariant(
class OciVariant(
val metadata: OciMetadata,
val layers: List<OciLayer>,
)

internal class OciLayer( // TODO internal?
class OciLayer(
val descriptor: OciLayerDescriptor,
val file: File,
)
Expand Down Expand Up @@ -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<OciDigest, File>,
images: List<OciImage>,
multiPlatformImageAndReferencesPairs: List<Pair<OciMultiPlatformImage, List<OciImageReference>>>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ internal class OciDescriptorImpl(
override val annotations: SortedMap<String, String>,
) : OciDescriptor

internal class OciData(
class OciData(
val mediaType: String,
val bytes: ByteArray,
digestAlgorithm: OciDigestAlgorithm,
) {
val digest = bytes.calculateOciDigest(digestAlgorithm)
}

internal class OciDataDescriptor(
class OciDataDescriptor(
val data: OciData,
override val annotations: SortedMap<String, String>,
) : OciDescriptor {
Expand Down

0 comments on commit 9aba070

Please sign in to comment.