Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

Working with Gradle and Module Groups

$
0
0

Hello,

 

I'm trying to migrate from v12 to v14. I have quite complex modules structure where individual source modules are grouped into module groups.

+--mg1

|  +--m1

|  +--m2

+--mg2

|  +--m3

|  +--m4

|  +--m5

+--External Libraries

 

To replicate similar structure in Gradle I use the following settings.properties:

rootProject.name = 'p'

include 'mg1:m1', 'mg1:m2'

include 'mg2:m3', 'mg2:m4', 'mg2:m5'

 

When I import Gradle project into IDEA or when "Refresh all Gradle projects" is clicked the following happens:

  • Project folder becomes a module one:
  • +--p

    |  +--mg1

    |  |  +--m1

    |  |  +--m2

    |  +--mg2

    |  |  +--m3

    |  |  +--m4

    |  |  +--m5

    +--External Libraries

  • Module files (IML) are added for a project (p.iml) and for both module groups (mg1.iml and mg2.iml)

Both outcomes are not expected since modules groups are not intended to carry on sources or module files. Having "p" as top level module (it's a project though) unveils special folders like .gradle, build, etc that don't add any value but cluttering project inspector view.

 

Is this a bug? Or a feature? Is there a workaround to prevent changes to files and project view?

 

I use "$ gradle ideaModule" for project file generation and it works almost as expected but there are some related unconveniences with this approach.

 

Thanks.


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>