Possibly an IntelliJ question, is there a way to s...
# getting-started
a
Possibly an IntelliJ question, is there a way to specify the root package name? I noticed if I have at least 1 class in the root and set the package to the name I want, then new files added there or sub directories automatically get the correct package name. Problem is if there are no classes in the root (only other sub-packages) then new files created in those don't get the correct package name and defaults to "package dirname" instead of "com.blah.modulename.dirname"
s
perhaps a file at root containing only
package com.blah.modulename
?
a
I did do that which seems like a weird workaround, figured it would be able to use something like a line in the build.gradle
r
In IntelliJ you can set the root package via the UI by going into Module Settings, selecting the source folder and editing it (ringed in red here):