In Gradle how to publish your library to the local repository and then connect it from this repository in another application?

Hello. Got a project consisting of several modules. Part of the modules going into the API, and connects to other modules using grant. I made some changes in Opishnya module, and now I have a new version to publish to a local repository and then connect it to another module. While I did not get to do it. Use the built-in IntelliJ IDEA and gradle. Tried tasks publish, publishToMavenLocal and publishMavenJavaPublicationToMavenlocal. It doesn't help. Go into the folder .m2 and there looked your library - everything is there (both versions). In the cache of gradle - only the old version. If in the main project build.gradle prescribe the new version, it highlights that line in red, and the project is going. What to do? How to do it the easiest way?
June 10th 19 at 15:14
1 answer
June 10th 19 at 15:16
Solution
Solution: add the repository (in build.gradle) mavenLocal(). + to publish, it is necessary to use the command publishToMavenLocal.

Find more questions by tags GradleJava