Skip to content

Instantly share code, notes, and snippets.

@Hackforid
Created January 5, 2023 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hackforid/4eca94b892e076761521e1348efdbdd8 to your computer and use it in GitHub Desktop.
Save Hackforid/4eca94b892e076761521e1348efdbdd8 to your computer and use it in GitHub Desktop.
获取模块的依赖
task runGetDeps() {
doLast {
project.getConfigurations().each { configuration ->
// println("conf $configuration.name")
if (configuration.name == "debugCompileClasspath" && configuration.canBeResolved) {
println("conf $configuration.name")
configuration.incoming.resolutionResult.getAllDependencies().each { dep ->
println("dep => $dep")
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment