We are checking the use of Grade instead of Maven. But the Gradle integration in IntelliJ seems to leak one major feature that the Maven integration provides: Resolve dependencies in project.
Background: We are developing several libraries with dependencies between each other. The libraries are located in separate GIT repositories and are mainly developed independently. However, sometime a new feature requires changes in several libraries.
With Maven this is not a problem: Create a project and import the libraries as Maven modules. When the version number fits, the project modules are resolved instead of the Maven repository binaries. So “Go to source” and refactoring are working well.
But the same scenario with Gradle is not working: only the Maven repository binaries are resolved and so there is no support to go to the actual code or to perform a refactoring.
To get a similar behaviour as with Maven, I only see the “composite builds” feature of Gradle. But this has several disadvantages:
- In the “settings.gradle.kts” there must be the path to the other build. As the libraries are in several GIT repositories, every developer has to check it out in an equal folder hierarchy to let it work. Also each developer has to check out all GIT repositories, even if he only works on one library module.
- Also the version number seams not to be respected: the referenced build is always used, even if the given version number in the dependency declaration is different. The Maven repository binaries should be used in such a case.
Is my observation correct, or did I something wrong. If I am right, are there any plans to improve the Gradle integration in IntelliJ to fix this?