Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I have a project, it is a Gradle project, and everytime I close Intellij it deletes the src files, they still exist in the directory just not in the idea project.
I thing that is deal with IntelliJ cache. Try to refresh Gradle configuration. Open Gradle Tool Window and click refresh button
I had the same issue with Maven and refreshing was helpful for me. Also may be useful system cache clean up.
Required, but never shown