Skip to content

Commit

Permalink
Revert default OciRegistryStorage to DistributionRegistryStorage
Browse files Browse the repository at this point in the history
reason: the amount of directories is not the important part for efficiency
  • Loading branch information
SgtSilvio committed Jan 20, 2024
1 parent 250fb10 commit 7aaca85
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 126 deletions.
119 changes: 0 additions & 119 deletions src/main/kotlin/io/github/sgtsilvio/gradle/oci/OciRegistryDataTask.kt

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.github.sgtsilvio.gradle.oci.dsl

import io.github.sgtsilvio.gradle.oci.DistributionRegistryDataTask
import io.github.sgtsilvio.gradle.oci.OciLayerTask
import io.github.sgtsilvio.gradle.oci.OciPushTask
import io.github.sgtsilvio.gradle.oci.OciRegistryDataTask
import io.github.sgtsilvio.gradle.oci.mapping.OciImageMapping
import io.github.sgtsilvio.gradle.oci.platform.Platform
import io.github.sgtsilvio.gradle.oci.platform.PlatformFilter
Expand All @@ -18,7 +18,7 @@ import org.gradle.api.tasks.testing.Test
interface OciExtension {
val layerTaskClass get() = OciLayerTask::class
val pushTaskClass get() = OciPushTask::class
val registryDataTaskClass get() = OciRegistryDataTask::class
val registryDataTaskClass get() = DistributionRegistryDataTask::class

val registries: OciRegistries
val imageMapping: OciImageMapping
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.sgtsilvio.gradle.oci.internal.dsl

import io.github.sgtsilvio.gradle.oci.OciRegistryDataTask
import io.github.sgtsilvio.gradle.oci.DistributionRegistryDataTask
import io.github.sgtsilvio.gradle.oci.TASK_GROUP_NAME
import io.github.sgtsilvio.gradle.oci.dsl.OciExtension
import io.github.sgtsilvio.gradle.oci.dsl.OciImageDefinition
Expand Down Expand Up @@ -89,9 +89,9 @@ internal abstract class OciExtensionImpl @Inject constructor(
val testTaskName = testTask.name
val registryDataTaskName = "${testTaskName}OciRegistryData"
val registryDataTask = if (registryDataTaskName in taskContainer.names) {
taskContainer.named<OciRegistryDataTask>(registryDataTaskName)
taskContainer.named<DistributionRegistryDataTask>(registryDataTaskName)
} else {
val registryDataTask = taskContainer.register<OciRegistryDataTask>(registryDataTaskName) {
val registryDataTask = taskContainer.register<DistributionRegistryDataTask>(registryDataTaskName) {
group = TASK_GROUP_NAME
description = "Creates a Docker registry data directory to be used by the $testTaskName task."
registryDataDirectory.set(projectLayout.buildDirectory.dir("oci/registries/$testTaskName"))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.github.sgtsilvio.gradle.oci.internal.dsl

import io.github.sgtsilvio.gradle.oci.OciRegistryDataTask
import io.github.sgtsilvio.gradle.oci.DistributionRegistryDataTask
import org.gradle.api.file.FileTree
import org.gradle.api.model.ObjectFactory
import org.gradle.api.provider.Provider
Expand All @@ -15,7 +15,7 @@ import org.gradle.process.CommandLineArgumentProvider
*/
internal class OciTestArgumentProvider(
objectFactory: ObjectFactory,
registryDataTask: TaskProvider<OciRegistryDataTask>,
registryDataTask: TaskProvider<DistributionRegistryDataTask>,
) : CommandLineArgumentProvider {

@get:InputFiles
Expand Down

0 comments on commit 7aaca85

Please sign in to comment.