Investigate Gradle Tooling API support #85
Labels
dependency resolution
Related to the project dependency/standard library resolver
enhancement
New feature or request
experimental
The feature is experimental and might be revoked
gradle
Related to the language server's support for Gradle projects
The current solution to find the dependencies of a module/project invokes Gradle from the command line and parses the output:
https://github.com/fwcd/KotlinLanguageServer/blob/322594f491369f51fdda33295101098d81d5bf3d/src/main/kotlin/org/javacs/kt/classpath/GradleDependencyResolver.kt#L54-L62
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
andIdeaModel
). 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 text was updated successfully, but these errors were encountered: