-
Notifications
You must be signed in to change notification settings - Fork 245
Open
Labels
dependency resolutionRelated to the project dependency/standard library resolverRelated to the project dependency/standard library resolverenhancementNew feature or requestNew feature or requestexperimentalThe feature is experimental and might be revokedThe feature is experimental and might be revokedgradleRelated to the language server's support for Gradle projectsRelated to the language server's support for Gradle projects
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
dependency resolutionRelated to the project dependency/standard library resolverRelated to the project dependency/standard library resolverenhancementNew feature or requestNew feature or requestexperimentalThe feature is experimental and might be revokedThe feature is experimental and might be revokedgradleRelated to the language server's support for Gradle projectsRelated to the language server's support for Gradle projects