From 57ae8c680ff3d9ca052d7c24b045ffdebc25c617 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Mon, 26 Feb 2024 01:30:17 +0100 Subject: [PATCH] Cleanup OciImageDependenciesImpl --- .../oci/internal/dsl/OciImageDependenciesImpl.kt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/kotlin/io/github/sgtsilvio/gradle/oci/internal/dsl/OciImageDependenciesImpl.kt b/src/main/kotlin/io/github/sgtsilvio/gradle/oci/internal/dsl/OciImageDependenciesImpl.kt index 29b18a8c..99fb1a7a 100644 --- a/src/main/kotlin/io/github/sgtsilvio/gradle/oci/internal/dsl/OciImageDependenciesImpl.kt +++ b/src/main/kotlin/io/github/sgtsilvio/gradle/oci/internal/dsl/OciImageDependenciesImpl.kt @@ -58,20 +58,19 @@ internal abstract class OciImageDependenciesImpl( // add dependency converted from a different notation - private fun createDependency(dependencyNotation: CharSequence) = + private fun module(dependencyNotation: CharSequence) = dependencyHandler.create(dependencyNotation) as ExternalModuleDependency - private fun createDependency(project: Project) = dependencyHandler.create(project) as ProjectDependency + private fun project(project: Project) = dependencyHandler.create(project) as ProjectDependency - final override fun add(dependencyNotation: CharSequence) = add(createDependency(dependencyNotation)) + final override fun add(dependencyNotation: CharSequence) = add(module(dependencyNotation)) final override fun add(dependencyNotation: CharSequence, action: Action) = - add(createDependency(dependencyNotation), action) + add(module(dependencyNotation), action) - final override fun add(project: Project) = add(createDependency(project)) + final override fun add(project: Project) = add(project(project)) - final override fun add(project: Project, action: Action) = - add(createDependency(project), action) + final override fun add(project: Project, action: Action) = add(project(project), action) // add constraint