Open
Description
The current solution to find the dependencies of a module/project invokes Gradle from the command line and parses the output:
A more elegant solution, however, would be to have direct, programmatic access to Gradle's APIs in order to fetch a list of dependency JARs. Both Eclipse and IntelliJ IDEA have custom project models inside the Gradle API that fit their specific use cases, but which can be used externally too (EclipseModel
and IdeaModel
). Unfortunately, these do have some limitations regarding Android support, which is why the current solution involves a custom Gradle script that is invoked as described above. Instead, a custom model could be built using the Tooling API.
Resources:
- The tooling API should provide a way to get the dependencies of the project gradle/gradle#4215 (comment)
- https://docs.gradle.org/current/javadoc/org/gradle/tooling/provider/model/ToolingModelBuilderRegistry.html (Tooling API extensibility points)
- https://stackoverflow.com/questions/40739674/external-registration-of-tooling-api-custom-models
- https://github.com/gradle/gradle/blob/38e0df22ecff6c894f5c3eeecb94106e2ba557ff/subprojects/docs/src/samples/toolingApi/eclipse/src/main/java/org/gradle/sample/Main.java#L28-L28 (EclipseModel sample)
- https://github.com/gradle/gradle/blob/38e0df22ecff6c894f5c3eeecb94106e2ba557ff/subprojects/docs/src/samples/toolingApi/idea/src/main/java/org/gradle/sample/Main.java (IdeaModel sample)
- https://mvnrepository.com/artifact/org.gradle/gradle-kotlin-dsl-tooling-models/0.18.1 (DSL tooling models)
Metadata
Metadata
Assignees
Labels
Related to the project dependency/standard library resolverRelated to the project dependency/standard library resolverNew feature or requestNew feature or requestThe feature is experimental and might be revokedThe feature is experimental and might be revokedRelated to the language server's support for Gradle projectsRelated to the language server's support for Gradle projects