ModuleNode

data class ModuleNode(val path: String, val name: String, val type: ModuleType, val plugins: Set<String> = emptySet(), val tags: Set<String> = emptySet(), val sourceSets: Set<String> = emptySet(), val buildFilePath: String? = null, val healthScore: Int? = null)(source)

A single Gradle subproject in the dependency graph.

Module type is inferred from applied plugin IDs in priority order: org.jetbrains.kotlin.multiplatform → KMP, com.android.kotlin.multiplatform.library → KMP_ANDROID_LIBRARY, com.android.application → ANDROID_APP, com.android.library → ANDROID_LIBRARY, org.jetbrains.kotlin.jvm → JVM_LIBRARY. Modules that match none of the above receive type UNKNOWN.

Parameters

path

Fully-qualified Gradle project path, e.g. ":feature:login:ui".

name

Short module name - the last path segment, e.g. "ui".

type

Module type inferred from applied plugin IDs.

plugins

All plugin class names applied to this module. Used for type detection.

tags

Organisational tags inferred from the path segments, e.g. setOf("feature", "login") for ":feature:login:ui".

sourceSets

KMP source set names when the module applies the multiplatform plugin, e.g. setOf("commonMain", "androidMain", "iosMain"). Empty for non-KMP modules.

buildFilePath

Relative path to this module's build file from the project root, e.g. "feature/login/ui/build.gradle.kts". Used in violation messages so developers know exactly which file to edit. Null when the path could not be resolved.

healthScore

Architecture health score in 0, 100. Computed by HealthScoreCalculator during extraction. Higher is healthier. Null for nodes deserialized from graph files produced by older plugin versions.

Constructors

Link copied to clipboard
constructor(path: String, name: String, type: ModuleType, plugins: Set<String> = emptySet(), tags: Set<String> = emptySet(), sourceSets: Set<String> = emptySet(), buildFilePath: String? = null, healthScore: Int? = null)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The last path segment - short display name used in reports and violation messages.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard