IntelliJ Gradle inter-module dependencies
Declaimer: I new to Java and IntelliJ, so sorry for potentially dumb question.
I starting a new Gradle project. I delegated all build actions to the Gradle (since I want to have the same build also for my CI/CD pipeline).
For the sake of example, I wanted to create module A and module B, and to make module A to be dependent on module B (e.g. to use inside module A a class coming from module B).
I added a dependency in "Project Structure -> Modules" dialog, compiling.. and getting a compile error in module A about cannot resolve symbol, which is a class from module B. I looks like despite I added "dependency" in "Modules" dialog, Gradle is not aware about that and therefore fails to resolve my class from module B.
Now, if that is the case, then I really confused. I would expect that adding dependency in "Dependencies" dialog will update everything for Gradle automatically. Isn't that works this way? If not, then if there any effect of "Dependencies" dialog in Gradle project?
How I should do that in the most correct way?
请先登录再写评论。
Please try to refresh the Gradle dependencies, let me know if it helps?