Any of those help Seems that you are describing module (package with little blue box), when you move it (Refactor -> Move) to another project with several modules under Maven, new module dependency is not added to parent pom.xml file. In case you add it to pom.xml like this:
it fixes the issue As of now, refactorings for Groovy in IntelliJ are pretty limited compared to Java. The reason for this is Groovy is an optionally typed language, so the IDE needs much more 'brain' for Groovy refactorings than for Java. create property currently does not exist for Groovy.
Error regenerating R.java file after refactoring (moving) a project folder in IntelliJ IDEA
I think the issue was by ths following , First let's talk about git, because the issue starts there. In git there is no such thing as "moving" a file. When you change a file's package, you change its location on the file system; but to git, that means you deleted the file in one place and created a new file in another place.