parseModuleRuntimeDependencies function

List<MavenCoordinate> parseModuleRuntimeDependencies(
  1. String jsonText
)

Parses runtime dependencies from Gradle module metadata JSON (<artifact>-<version>.module).

Gradle publishes richer dependency info than the POM: AndroidX/KMP artifacts regularly declare runtime-only dependencies (e.g. androidx.camera → kotlinx-atomicfu) that the POM omits entirely.

Variant selection: only variants whose name contains runtime (case- insensitive) and no non-Android/JVM platform marker contribute — api elements, sources, and iOS/JS/native runtime variants are irrelevant for Android builds. Versions come from requires / prefers / strictly, in that order; entries without a resolvable version are skipped. Malformed JSON yields an empty list (best-effort by design — the POM graph remains the baseline).

Implementation

List<MavenCoordinate> parseModuleRuntimeDependencies(String jsonText) =>
    const MavenMetadataParser().moduleRuntimeDependencies(jsonText);