mirror of
https://github.com/tadfisher/gradle2nix.git
synced 2026-01-11 23:40:37 -05:00
Fix dependency resolution for plugins in buildSrc
This commit is contained in:
@@ -52,12 +52,12 @@ internal class ConfigurationResolver(
|
||||
private val ivy = Ivy.newInstance(ivySettings)
|
||||
|
||||
fun resolve(configuration: Configuration): List<DefaultArtifact> {
|
||||
val resolved = configuration.resolvedConfiguration
|
||||
val resolved = configuration.resolvedConfiguration.lenientConfiguration
|
||||
|
||||
val topLevelMetadata = resolved.firstLevelModuleDependencies
|
||||
.flatMap { resolveMetadata(it.moduleGroup, it.moduleName, it.moduleVersion) }
|
||||
|
||||
val allArtifacts = resolved.resolvedArtifacts
|
||||
val allArtifacts = resolved.artifacts
|
||||
.filter { it.id.componentIdentifier is ModuleComponentIdentifier }
|
||||
.flatMap(::resolve)
|
||||
|
||||
@@ -205,7 +205,7 @@ internal class ConfigurationResolver(
|
||||
val seen = mutableSetOf<ComponentArtifactIdentifier>()
|
||||
return generateSequence(listOf(this)) { descs ->
|
||||
val parents = descs.flatMap { it.parentDescriptors(seen) }
|
||||
seen.addAll(parents.map(ResolvedArtifactResult::id))
|
||||
seen.addAll(parents.map(ResolvedArtifactResult::getId))
|
||||
parents.takeUnless { it.isEmpty() }
|
||||
}.flatten().distinct().toList()
|
||||
}
|
||||
|
||||
@@ -10,8 +10,9 @@ internal open class PluginResolver @Inject constructor(
|
||||
) {
|
||||
private val configurations = pluginDependencyResolutionServices.configurationContainer
|
||||
|
||||
private val resolver = ConfigurationResolverFactory(pluginDependencyResolutionServices.resolveRepositoryHandler)
|
||||
.create(pluginDependencyResolutionServices.dependencyHandler)
|
||||
private val resolver = ConfigurationResolverFactory(
|
||||
pluginDependencyResolutionServices.resolveRepositoryHandler
|
||||
).create(pluginDependencyResolutionServices.dependencyHandler)
|
||||
|
||||
fun resolve(pluginRequests: List<PluginRequest>): List<DefaultArtifact> {
|
||||
val markerDependencies = pluginRequests.map {
|
||||
|
||||
Reference in New Issue
Block a user