Skip to content

Commit

Permalink
Cleanup OciImageInput/SpecResolution.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
SgtSilvio committed Jul 18, 2024
1 parent d0481f2 commit 1c3ca74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ internal fun ResolvableDependencies.resolveOciImageInputs(
): Provider<List<OciImagesTask.ImageInput>> {
val rootComponentResultProvider = resolutionResult.rootComponent
val imageSpecsProvider =
rootComponentResultProvider.zipAbsentAsNull(platformSelectorProvider) { rootComponentResult, platformSelector ->
resolveOciImageSpecs(rootComponentResult, platformSelector)
}
rootComponentResultProvider.zipAbsentAsNull(platformSelectorProvider, ::resolveOciImageSpecs)
val artifactResultsProvider = artifactView {
componentFilter(
ArtifactViewVariantFilter(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ internal fun resolveOciImageSpecs(
platformSelector: PlatformSelector?,
): List<OciImageSpec> {
val rootNodesToReferenceSpecs = resolveOciVariantGraph(rootComponentResult)
return resolveOciImageSpecs(rootNodesToReferenceSpecs, platformSelector)
return collectOciImageSpecs(rootNodesToReferenceSpecs, platformSelector)
}

private fun resolveOciVariantGraph(
Expand Down Expand Up @@ -134,7 +134,7 @@ private val ResolvedVariantResult.platformOrUniversalOrMulti: String
return capabilities.first().name.substringAfterLast('@')
}

private fun resolveOciImageSpecs(
private fun collectOciImageSpecs(
rootNodesToReferenceSpecs: Map<OciVariantNode, Set<OciImageReferenceSpec>>,
platformSelector: PlatformSelector?,
): List<OciImageSpec> {
Expand Down

0 comments on commit 1c3ca74

Please sign in to comment.