ProjectGraph

data class ProjectGraph(val builds: Map<String, List<Module>>, externalDependenciesLoader: () -> DependencyGraphModel = { DependencyGraphModel() })

Represents the complete structural graph of the multi-project/composite build. It provides core querying capabilities, circular dependency verification, and access to the parsed class/declaration hierarchy of the entire workspace.

Constructors

Link copied to clipboard
constructor(builds: Map<String, List<Module>>, externalDependenciesLoader: () -> DependencyGraphModel = { DependencyGraphModel() })

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Map of build ID to the list of modules contained inside that build.

Link copied to clipboard
val externalDependencies: DependencyGraphModel

Functions

Link copied to clipboard

Detects dependency cycles in the module graph and throws an AssertionError if a cycle is found. The verification is performed using a Depth-First Search (DFS) traversal.

Link copied to clipboard
fun findModule(buildId: String, path: String): Module?

Looks up a module within the project graph by its build ID and Gradle project path.

Link copied to clipboard

Returns a flat list of all modules across all builds in this graph.