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
package com.autonomousapps.visitor
import com.autonomousapps.model.Dependency
import com.autonomousapps.model.DependencyGraphView
import com.autonomousapps.model.ProjectVariant
import com.autonomousapps.model.declaration.Declaration
internal class GraphViewReader(
private val project: ProjectVariant,
private val dependencies: Set,
private val graph: DependencyGraphView,
private val declarations: Set
) {
fun accept(visitor: GraphViewVisitor) {
val context = DefaultContext(project, dependencies, graph, declarations)
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
) : GraphViewVisitor.Context