INNER CODE UNIT · Kotlin
dependencyNodes
androidx/media · build-logic/src/main/kotlin/androidx/media3/buildlogic/aarTypeWorkaround.kt:88
val dependencyNodes = (dependenciesNode.children() as List<*>).filterIsInstance<Node>()
for (dependencyNode in dependencyNodes) {
val depChildren = (dependencyNode.children() as List<*>).filterIsInstance<Node>()
val groupIdNode = depChildren.find { it.name().toString().endsWith("groupId") }
val artifactIdNode = depChildren.find { it.name().toString().endsWith("artifactId") }
val groupId = groupIdNode?.children()?.firstOrNull()?.toString()
val artifactId = artifactIdNode?.children()?.firstOrNull()?.toString()
val dependencyName = "$groupId:$artifactId"
val isProjectLibrary = groupId == "androidx.media3"
val hasJar = jarOnlyDependencies.contains(dependencyName)
val hasAar = isProjectLibrary || aarDependencies.contains(dependencyName)
if (!hasJar && !hasAar) {
// To look for what kind of dependency it is i.e. aar or jar type,
// please expand the External Libraries in Project view in Android Studio
// and search for your dependency inside Gradle Script dependencies.
// .aar files have @aar suffix at the end of their name,