Hi everyone, Does someone know how can I configur...
# intellij
g
Hi everyone, Does someone know how can I configure the
qualified names
of my modules on IntelliJ? Or how can I configure the qualified modules names in
.gradle.kts
files? When importing a gradle project I would like it automatically creates the modules tree, but it is not creating it properly. Since the other option
explicit module groups
seems to be something manual, that will disappear in the next project refresh, I would like to create something persistent, that will work across projects re-imports.
a
Could you explain
it is not creating it properly
?
g
Yes. The modules appear in IntelliJ like plain ones, without the tree structure. For example, if I have the modules
a
,
a-a1
,
a-a1-a11
it appears like
a
,
a-a1
a-a1-a11
when it should be:
a
a-a1
a-a1-a11
like a tree. I did a simple test on a project with some theoretical modules and it works. But in my current project it is not working. I’ve checked the module names and their hierarchy and it looks good, but they appear like a plain list, instead of a tree.
a
Did you added on your
settings.gradle
file
include ':a-a1'
if you want
a-a1
as a submodule of
a
the module
a
settings file should have the
include
expression
g
Screen Shot 2019-04-22 at 12.53.52.png
Screen Shot 2019-04-22 at 12.54.35.png
These screenshot show what I mean. In the first case I was able to create a tree, but in the second case not, the
application-backend-jvm
module should be inside the
application-backend
one.
Yes, I’m including the modules with something like
include(":application")
project(":application").projectDir = .../application
include(":application:application-backend")
project(":application:application-backend").projectDir = .../application/backend
include(":application:application-backend:application-backend:application-backend-jvm")
project(":application:application-backend:application-backend-jvm").projectDir = .../application/backend/jvm
where I’m omitting correct way to define the part
.../
for brevity
In the other example, that works, I have the following:
Copy code
rootProject.name = "root"

include(":a:a-a1:a-a1-a11")
project(":a:a-a1:a-a1-a11").projectDir = File(rootProject.projectDir, "a/a1/a11")

include(":b:b-a1:b-a1-a11")
project(":b:b-a1:b-a1-a11").projectDir = File(rootProject.projectDir, "b/a1/a11")
I tried to use just the
Copy code
include(":application:application-backend:application-backend:application-backend-jvm")
project(":application:application-backend:application-backend-jvm").projectDir = File(rootProject.projectDir, "application/backend/jvm")
but Intellij create new folders with names like
application-backend
with
iml
files inside. But as you can see, in the other example with
a
and
b
modules it is working =/
a
Have you tried to import the project again?
g
Yes, I removed the .idea folder and the .iml files. I also removed the other files with
git clean -fdx
. But even after reimporting it still remains plane =/, unfortunately