Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
(1 edit)

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 "" and fix the build.gradle.

But getting to that fix took some swearing and complaining.

I just learned that you shouldn't use capitals in package names from the libgdx project creator. It will actually give you a warning if you try to give it a package name with a capital. Do you know what the reason for no using capitals is? Will it cause in problems if you do use them? Some of my old android games have capitals in the package name so was wondering if that could turn into a problem?

I have checked the java documentation, and it just says it's to avoid conflicts with class names.


Quote: "Package names are written in all lower case to avoid conflict with the names of classes or interfaces.")

So as long as you don't have classes named the same as your packages you are fine!