com.autonomousapps.visitor.GraphViewReader.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dependency-analysis-gradle-plugin Show documentation
Show all versions of dependency-analysis-gradle-plugin Show documentation
Analyzes dependency usage in Android and JVM projects
// Copyright (c) 2024. Tony Robalik.
// SPDX-License-Identifier: Apache-2.0
package com.autonomousapps.visitor
import com.autonomousapps.model.internal.Dependency
import com.autonomousapps.model.internal.DependencyGraphView
import com.autonomousapps.model.DuplicateClass
import com.autonomousapps.model.internal.ProjectVariant
import com.autonomousapps.model.declaration.internal.Declaration
internal class GraphViewReader(
private val project: ProjectVariant,
private val dependencies: Set,
private val graph: DependencyGraphView,
private val declarations: Set,
private val duplicateClasses: Set,
) {
fun accept(visitor: GraphViewVisitor) {
val context = DefaultContext(project, dependencies, graph, declarations, duplicateClasses)
dependencies.forEach { dependency ->
visitor.visit(dependency, context)
}
}
}
internal class DefaultContext(
override val project: ProjectVariant,
override val dependencies: Set,
override val graph: DependencyGraphView,
override val declarations: Set,
override val duplicateClasses: Set,
) : GraphViewVisitor.Context
© 2015 - 2025 Weber Informatics LLC | Privacy Policy