Skip to content

Commit

Permalink
Make (Versioned)Coordinates internal and move to mapping package
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtSilvio committed Jul 9, 2024
1 parent 48d0e55 commit 23663af
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package io.github.sgtsilvio.gradle.oci.internal.registry
import com.github.benmanes.caffeine.cache.AsyncCache
import com.github.benmanes.caffeine.cache.Caffeine
import io.github.sgtsilvio.gradle.oci.attributes.*
import io.github.sgtsilvio.gradle.oci.component.VersionedCoordinates
import io.github.sgtsilvio.gradle.oci.internal.*
import io.github.sgtsilvio.gradle.oci.internal.cache.getMono
import io.github.sgtsilvio.gradle.oci.internal.json.addArray
Expand All @@ -12,6 +11,7 @@ import io.github.sgtsilvio.gradle.oci.internal.json.addObject
import io.github.sgtsilvio.gradle.oci.internal.json.jsonObject
import io.github.sgtsilvio.gradle.oci.mapping.MappedComponent
import io.github.sgtsilvio.gradle.oci.mapping.OciImageMappingData
import io.github.sgtsilvio.gradle.oci.mapping.VersionedCoordinates
import io.github.sgtsilvio.gradle.oci.mapping.map
import io.github.sgtsilvio.gradle.oci.metadata.*
import io.netty.handler.codec.http.HttpHeaderNames
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package io.github.sgtsilvio.gradle.oci.component
package io.github.sgtsilvio.gradle.oci.mapping

import java.io.Serializable

/**
* @author Silvio Giebl
*/
data class Coordinates(val group: String, val name: String) : Comparable<Coordinates>, Serializable {
internal data class Coordinates(val group: String, val name: String) : Comparable<Coordinates>, Serializable {
override fun compareTo(other: Coordinates): Int {
group.compareTo(other.group).also { if (it != 0) return it }
return name.compareTo(other.name)
Expand All @@ -14,7 +14,7 @@ data class Coordinates(val group: String, val name: String) : Comparable<Coordin
override fun toString() = "$group:$name"
}

data class VersionedCoordinates(
internal data class VersionedCoordinates(
val coordinates: Coordinates,
val version: String,
) : Comparable<VersionedCoordinates>, Serializable {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.github.sgtsilvio.gradle.oci.mapping

import io.github.sgtsilvio.gradle.oci.component.VersionedCoordinates
import io.github.sgtsilvio.gradle.oci.metadata.OciImageReference
import java.util.*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.github.sgtsilvio.gradle.oci.mapping

import io.github.sgtsilvio.gradle.oci.component.VersionedCoordinates
import io.github.sgtsilvio.gradle.oci.metadata.OciImageReference
import java.util.*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
package io.github.sgtsilvio.gradle.oci.mapping

import io.github.sgtsilvio.gradle.oci.component.Coordinates
import io.github.sgtsilvio.gradle.oci.component.VersionedCoordinates
import org.gradle.api.Action
import org.gradle.api.model.ObjectFactory
import org.gradle.kotlin.dsl.mapProperty
import org.gradle.kotlin.dsl.newInstance
import java.util.*
import javax.inject.Inject

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package io.github.sgtsilvio.gradle.oci.mapping

import io.github.sgtsilvio.gradle.oci.component.Coordinates
import io.github.sgtsilvio.gradle.oci.component.VersionedCoordinates

/**
* @author Silvio Giebl
*/
Expand Down

0 comments on commit 23663af

Please sign in to comment.