I want to get the final/resolved dependencies, in fact, a list of artifacts used in a given build (for example, “assembleDebug” in Android). How do I get that?
I ran into examples such as:
task dumpDependencies {
doLast {
def resolved = configurations.compileClasspath.resolvedConfiguration
resolved.resolvedArtifacts.each {
artifact-> println "Artifact: $artifact"
}
}
}
Above doesn’t work for Gradle 7.5 and I get the error:
Could not get unknown property ‘compileClasspath’ for configuration container of type org.gradle.api.internal.artifacts.configurations.DefaultConfigurationContainer.
How do I accomplish what I need?