Just had a little (2 hours wasted) hickup.
I noticed that I managed to use capitalization in my package name "net.jppresents.lifeInSpace" .. package names should of course be all lowercase.
So quick fix, IntelliJ refactor "lifeInSpace" -> "lifeinspace" .. and that's when things went wrong.
Root cause of all the problems: windows
Windows does not care about case in filenames / directory names. It does save it, when you create a file/dir.. but when changing it, things go weird.
The refactor changes the case in all files that reference the package, but can't (due to windows) actually change the directory names. This (with some unexplained gradle behavior) killed the main class from my desktop build.gradle and made commiting the name change to git impossible.
easy fix: Refactor to a different package name, I choose "net.jppresents.space" and fix the build.gradle.
But getting to that fix took some swearing and complaining.