ExternalDependency

data class ExternalDependency(val module: String, val group: String, val name: String, val version: String? = null, val configuration: String, val sourceSet: String? = null)(source)

A declared external (third-party) dependency of a single module.

Captured from Gradle configurations during the aalekhExtract task and stored in ModuleDependencyGraph.externalDependencies. Each instance represents one implementation("group:name:version") (or equivalent) declaration.

These are the declared coordinates read from configuration.dependencies at configuration time - never the resolved dependency graph. Reading resolved artifacts would trigger dependency resolution and break the configuration cache, so it is deliberately avoided.

Parameters

module

Gradle path of the module that declares this dependency, e.g. ":feature:login:ui".

group

Maven group, e.g. "androidx.core". Empty when the notation omits a group.

name

Artifact name, e.g. "core-ktx".

version

Declared version, e.g. "1.13.1". Null when the version is managed elsewhere (a BOM / platform, or a version-catalog alignment) and is not stated at the declaration site.

configuration

Gradle configuration name the dependency was declared on: "implementation", "api", "testImplementation", "commonMainImplementation", etc. The declaration type is recoverable from this string via isApi / isTest / isCompileOnly.

sourceSet

For KMP modules: the source set that owns this dependency, e.g. "commonMain", "androidMain". Null for standard Android/JVM configurations.

Constructors

Link copied to clipboard
constructor(module: String, group: String, name: String, version: String? = null, configuration: String, sourceSet: String? = null)

Properties

Link copied to clipboard
Link copied to clipboard

Human-readable Maven coordinate group:name:version. The group segment is dropped when group is blank, and an unstated version renders as unspecified.

Link copied to clipboard
Link copied to clipboard

True when this is a production api dependency - it leaks transitively onto every consumer of module. Covers the plain api configuration and KMP / build-type source-set api configurations (commonMainApi, androidMainApi, debugApi, ...). Test api configurations (testApi) are excluded - they never affect the production surface.

Link copied to clipboard

True when this dependency is only available at compile time, not at runtime.

Link copied to clipboard

True when this is a test-only dependency that does not affect production builds.

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