Kotlin script to list transitive dependencies of a Maven artifact.
$ kotlin tree.main.kts --help
Usage: tree.main.kts [ARGUMENTS] [OPTIONS]
Arguments:
artifact [groupId:artifactId:version] -> Name of the artifact to explore (optional)
Options:
--help, -h -> Usage info
--quiet, -q [false] -> Hide debug message
--no-legend [false] -> Hide the legend
--repository=<URL> -> Maven repository (vararg) defaults to Maven Central
$ kotlin tree.main.kts org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.2 --repository=https://repo1.maven.org/maven2
π² Maven Dependency Tree
βοΈ Arguments: [org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.2, --repository=https://repo1.maven.org/maven2]
π‘ Crawling POM filesβ¦
β
https://repo1.maven.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core/1.6.2/kotlinx-coroutines-core-1.6.2.pom in 423.921752ms
β
https://repo1.maven.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core-jvm/1.6.2/kotlinx-coroutines-core-jvm-1.6.2.pom in 3.886530ms
β
https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.6.21/kotlin-stdlib-jdk8-1.6.21.pom in 4.248533ms
β
https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.6.21/kotlin-stdlib-common-1.6.21.pom in 2.873122ms
β
https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.6.21/kotlin-stdlib-1.6.21.pom in 6.473750ms
β
https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.6.21/kotlin-stdlib-jdk7-1.6.21.pom in 3.954230ms
β
https://repo1.maven.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.pom in 6.219047ms
β± Total duration: 666.792915ms
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.2
ββ org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.2 (compile)
ββ org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21 (compile)
β ββ org.jetbrains.kotlin:kotlin-stdlib:1.6.21 (compile)
β β ββ org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21 (compile)
β β ββ org.jetbrains:annotations:13.0 (compile)
β ββ org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.21 (compile)
β ββ org.jetbrains.kotlin:kotlin-stdlib:1.6.21 (compile) β©οΈ
ββ org.jetbrains.kotlin:kotlin-stdlib-common:1.6.21 (compile) β©οΈ
π£ Legend:
- π Cyclic dependency
- β©οΈ Already printed
- β Non resolvable
- π Failed to resolve
$ kotlin tree.main.kts androidx.core:core:1.8.0 --repository=https://dl.google.com/android/maven2 --repository=https://repo1.maven.org/maven2
π² Maven Dependency Tree
βοΈ Arguments: [androidx.core:core:1.8.0, --repository=https://dl.google.com/android/maven2, --repository=https://repo1.maven.org/maven2]
π‘ Crawling POM filesβ¦
β
https://dl.google.com/android/maven2/androidx/core/core/1.8.0/core-1.8.0.pom in 509.684913ms
β
https://dl.google.com/android/maven2/androidx/annotation/annotation/1.2.0/annotation-1.2.0.pom in 18.624724ms
β
https://dl.google.com/android/maven2/androidx/annotation/annotation-experimental/1.1.0/annotation-experimental-1.1.0.pom in 62.313017ms
β
https://dl.google.com/android/maven2/androidx/collection/collection/1.0.0/collection-1.0.0.pom in 20.174835ms
β
https://dl.google.com/android/maven2/androidx/concurrent/concurrent-futures/1.0.0/concurrent-futures-1.0.0.pom in 52.146949ms
β
https://dl.google.com/android/maven2/androidx/lifecycle/lifecycle-runtime/2.3.1/lifecycle-runtime-2.3.1.pom in 28.580292ms
β
https://dl.google.com/android/maven2/androidx/versionedparcelable/versionedparcelable/1.1.1/versionedparcelable-1.1.1.pom in 46.431111ms
β https://dl.google.com/android/maven2/junit/junit/4.12/junit-4.12.pom FileNotFoundException in 28.122588ms
β
https://repo1.maven.org/maven2/junit/junit/4.12/junit-4.12.pom in 54.531166ms
β
https://dl.google.com/android/maven2/androidx/annotation/annotation/1.0.0/annotation-1.0.0.pom in 55.419471ms
β https://dl.google.com/android/maven2/com/google/guava/listenablefuture/1.0/listenablefuture-1.0.pom FileNotFoundException in 48.115922ms
β
https://repo1.maven.org/maven2/com/google/guava/listenablefuture/1.0/listenablefuture-1.0.pom in 4.110027ms
β
https://dl.google.com/android/maven2/androidx/annotation/annotation/1.1.0/annotation-1.1.0.pom in 57.136983ms
β
https://dl.google.com/android/maven2/androidx/lifecycle/lifecycle-common/2.3.1/lifecycle-common-2.3.1.pom in 55.194970ms
β
https://dl.google.com/android/maven2/androidx/arch/core/core-common/2.1.0/core-common-2.1.0.pom in 23.480057ms
β
https://dl.google.com/android/maven2/androidx/arch/core/core-runtime/2.1.0/core-runtime-2.1.0.pom in 55.992375ms
β https://dl.google.com/android/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom FileNotFoundException in 17.272216ms
β
https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.pom in 2.422317ms
β± Total duration: 1.303770532s
androidx.core:core:1.8.0
ββ androidx.annotation:annotation:1.2.0 (compile)
ββ androidx.annotation:annotation-experimental:1.1.0 (compile)
ββ androidx.collection:collection:1.0.0 (runtime)
β ββ junit:junit:4.12 (test)
β β ββ org.hamcrest:hamcrest-core:1.3
β ββ androidx.annotation:annotation:1.0.0 (compile)
ββ androidx.concurrent:concurrent-futures:1.0.0 (runtime)
β ββ com.google.guava:listenablefuture:1.0 (compile)
β ββ androidx.annotation:annotation:1.1.0 (compile)
ββ androidx.lifecycle:lifecycle-runtime:2.3.1 (compile)
β ββ androidx.lifecycle:lifecycle-common:2.3.1 (compile)
β β ββ androidx.annotation:annotation:1.1.0 (compile) β©οΈ
β ββ androidx.arch.core:core-common:2.1.0 (compile)
β β ββ androidx.annotation:annotation:1.1.0 (compile) β©οΈ
β ββ androidx.annotation:annotation:1.1.0 (compile) β©οΈ
β ββ androidx.arch.core:core-runtime:2.1.0 (runtime)
β ββ androidx.annotation:annotation:1.1.0 (compile) β©οΈ
β ββ androidx.arch.core:core-common:[2.1.0] (compile) β
ββ androidx.versionedparcelable:versionedparcelable:1.1.1 (compile)
ββ androidx.annotation:annotation:1.1.0 (compile) β©οΈ
ββ androidx.collection:collection:1.0.0 (compile)
ββ junit:junit:4.12 (test) β©οΈ
ββ androidx.annotation:annotation:1.0.0 (compile) β©οΈ
π£ Legend:
- π Cyclic dependency
- β©οΈ Already printed
- β Non resolvable
- π Failed to resolve
- @martinbonnin for Xoxo
A wrapper around org.w3c.dom with nicer Kotlin APIs.
Copyright 2022 Simon Marquis
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.