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 03d6a68c..57d59be2 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 @@ -39,11 +39,8 @@ internal abstract class OciImageDependenciesImpl( protected abstract fun addInternal(dependencyProvider: Provider): T - @Suppress("UNCHECKED_CAST") - private fun ensureMutable(dependency: D) = dependencyHandler.create(dependency) as D - private fun finalizeDependency(dependency: D, action: Action?): D { - val finalizedDependency = ensureMutable(dependency) + @Suppress("UNCHECKED_CAST") val finalizedDependency = dependencyHandler.create(dependency) as D action?.execute(finalizedDependency) return finalizedDependency }