Open GambitDev opened 1 year ago
Took a look as to how that wizard works and it looks like it retrieves the starter projects from this file here:
https://store.korge.org/starterkits.json
It then just downloads and unzip the project files for the respective project, with the name of the root directory as whatever name the user sets.
Maybe what we could do is check if there exists a settings.gradle.kts
file and append:
rootProject.name = "<safe project name>"
can there even be a situation where a Korge project does not have a settings file? I'm pretty new to this repo but was under the impression that Korge uses gradle as a build system
Yes, generating/updating a settings.gradle.kts
with a safe root name could help. Let's speciffy a valid name in templates for now.
I have called my project "Space Shooter" and I now can't build it for android as this generate a module called "Space Shooter.deps" which is not a valid android name for a module
To fix this I had to add this line to my
settings.gradle.kts
file:rootProject.name = "SpaceShooter"
That means that the new project created via the Korge plugin in Intellij does not perform any type of check to the project name, I think it would be better for the new project to have a "safe" name based on the project name set by the user, removing spaces and invalid characters and stuff like that and automatically add the "safe" name to the gradle settings file