Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]
## [v1.5.1] - 2026-04-01

### Fixed

- Transitive dependencies now properly include sub-projects

## [v1.5.0] - 2026-03-26

### Fixed

Expand Down
2 changes: 2 additions & 0 deletions kirc-blocking/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ plugins {
kotlin("libs.publisher")
}

group = "com.github.cmdjulian.kirc"

dependencies {
api(project(":kirc-core"))
api(project(":kirc-image"))
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package de.cmdjulian.kirc.tar

import kotlinx.coroutines.runBlocking
import java.nio.file.Path

object BlockingImageExtractor {
/**
* Parses docker container image from [path] representing a tar file into an object Representation
*
* If [isGzipped] is true, the file will be treated as gzipped tar and decompressed before parsing
*/
fun parse(path: Path, isGzipped: Boolean = false): ContainerImageMetadata =
runBlocking { ImageExtractor.parse(path, isGzipped) }
}
2 changes: 2 additions & 0 deletions kirc-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ plugins {
kotlin("kapt")
}

group = "com.github.cmdjulian.kirc"

dependencies {
implementation(project(":kirc-image"))

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package de.cmdjulian.kirc.tar

import de.cmdjulian.kirc.image.Digest
import de.cmdjulian.kirc.spec.Platform
import de.cmdjulian.kirc.spec.image.ImageConfig
import de.cmdjulian.kirc.spec.manifest.LayerReference
import de.cmdjulian.kirc.spec.manifest.ManifestList
import de.cmdjulian.kirc.spec.manifest.ManifestSingle

/**
* Represents the metadata of an image tar archive without spilled blobs.
*
* @param index content of index.json
* @param images collected manifests specified in index with their metadata
*/
data class ContainerImageMetadata(val index: ManifestList, val images: List<ContainerImageSingleMetadata>) {
val imageForCurrentPlatform: ContainerImageSingleMetadata?
get() = images.firstOrNull { image ->
Platform(image.config.os, image.config.architecture) == Platform.current()
}
}

/**
* Represents a single platform image's metadata — no blob paths, just descriptors and deserialized config.
*
* @param manifest manifest of platform image
* @param digest digest of platform image manifest
* @param layers layer descriptors from the manifest (mediaType, size, digest)
* @param config deserialized image config
* @param tags human-readable tags for this image (e.g. "ubuntu:22.04"); empty if untagged.
* Resolved from Docker-format manifest.json repoTags and OCI index annotations
* (org.opencontainers.image.ref.name).
*/
data class ContainerImageSingleMetadata(
val manifest: ManifestSingle,
val digest: Digest,
val layers: List<LayerReference>,
val config: ImageConfig,
val tags: List<String>,
)
2 changes: 2 additions & 0 deletions kirc-image/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ plugins {
kotlin("kapt")
}

group = "com.github.cmdjulian.kirc"

tasks.jar {
manifest {
attributes(mapOf("Implementation-Title" to project.name, "Implementation-Version" to project.version))
Expand Down
2 changes: 2 additions & 0 deletions kirc-reactive/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ plugins {
kotlin("libs.publisher")
}

group = "com.github.cmdjulian.kirc"

dependencies {
api(project(":kirc-core"))
api(project(":kirc-image"))
Expand Down
2 changes: 2 additions & 0 deletions kirc-suspending/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ plugins {
kotlin("kapt")
}

group = "com.github.cmdjulian.kirc"

dependencies {
api(project(":kirc-core"))
api(project(":kirc-image"))
Expand Down

This file was deleted.

Loading