Skip to content

Commit

Permalink
WIP variants for each platform
Browse files Browse the repository at this point in the history
- Cleanup OciImageDependenciesImpl
  • Loading branch information
SgtSilvio committed Jul 8, 2024
1 parent 4b03465 commit 6631901
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,8 @@ internal abstract class OciImageDependenciesImpl<T>(

protected abstract fun addInternal(dependencyProvider: Provider<out ModuleDependency>): T

@Suppress("UNCHECKED_CAST")
private fun <D : ModuleDependency> ensureMutable(dependency: D) = dependencyHandler.create(dependency) as D

private fun <D : ModuleDependency> finalizeDependency(dependency: D, action: Action<in D>?): D {
val finalizedDependency = ensureMutable(dependency)
@Suppress("UNCHECKED_CAST") val finalizedDependency = dependencyHandler.create(dependency) as D
action?.execute(finalizedDependency)
return finalizedDependency
}
Expand Down

0 comments on commit 6631901

Please sign in to comment.