How do we best organize multi-module projects to easily test changes in libraries?
Hi! I'd like some advice for how to best set up a project with sub-modules with applications and libraries.
We have multiple git repositories, each containing a Gradle Java or Kotlin application, or a library that is built using Maven (in some cases Gradle). Each developer sets up an IntelliJ project with each application or library as a Module.
The libraries are built and uploaded to our own private Maven repository, which the applications are set up to import from. Sometimes you want to make a change in a library and immediately test it locally in a client application. Currently, we make changes in the library, change the version of the library in the pom.xml, run "maven install", change build.gradle in the client application to pick up the right version... rather cumbersome and errorprone. I'd like it to be as simple as make a change in library code and press play in the client application. Any ideas?
Please sign in to leave a comment.
Currently there is no Maven/Gradle cross modules dependencies. If there is a Maven library used by Gradle project IDE will resolve it to a repository jar library.
There is experimental option that adds such cross libraries dependency you can try, see related thread.
Note that these Maven/Gradle modules must be located under the same IDE project and should have the same artifact coordinates.
Thanks a lot for the answer, Andrey!