This message was deleted.
# community-support
s
This message was deleted.
c
Tooling API should expose what you need. That is what IDEs, for example, use to gather dependency information.
☝️ 1
c
Could you direct me to the exact place to see repositories, for instance? I've studied the objects below, but found no information on repos or deps. Well, there was a list of classpath dependencies in Eclipse model (found that on SO), but I need tree, not flat list.
Well, since Gradle files are valid Groovy files, looks like I need to parse Groovy AST and extract necessary data. I see no easier way to do so.
c
use the Tooling API (you’ll need to track down examples). The source files (which may be Groovy or Kotlin) don’t reflect the processing to generate the dependency model, including conflict resolution, constraints, etc.
g
You could look into JetBrains IDEA code to look how they analyze Gradle build though it could be quite convoluted. https://github.com/JetBrains/intellij-community/tree/master/plugins/gradle Another way is to inject your own gradle scripts via init script to analyse for example repos using just a standard gradle APIs. I used such approach in functional tests for settings plugin: https://github.com/grossws/private-repo/blob/main/src/functionalTest/kotlin/ws/gross/gradle/PrivateRepoPluginFunctionalTest.kt#L288-L301