Muliti Project or Module guide

Answered

How do I create a Multi project or Multi module project similar to a Solution and class library in visual studio with intellij and gradle?  I'd like to create a Class library in kotlin and share it with a Spring project, a kotlin to javascript project and a command line application.  There isn't a clear and definitive guide on how to do this so I'm stuck trying to piece together stack overflow answers.

6 comments
Comment actions Permalink

This is a 47 minute video and I'm still not seeing someone start from scratch on how to build a mult module project.  Compared to visual studio where I don't need any tutorial because it's completely intuitive even the dotnet core cli is pretty simple to figure out. Moreover, in haskell stack it's fairly easy to figure out from this 10 min tutorial here.

https://www.youtube.com/watch?v=PBNuua5zpZU

Why is there not a simple guide on how to do this in intellij?

0
Comment actions Permalink

I watched this also before I asked the question.  I'm haveing the same issue that's posted in the commments of that video.  When he adds the projects the settings.gradle file he gets multi projects however nothing happens when I do the same thing.  There were others that commented that said the same thing.

0
Comment actions Permalink

You either need to enable the auto-import option or Refresh manually:

0
Comment actions Permalink

I've got it working.  You have to make sure the "Create directories for empty content roots automatically" is checked and have the submodules defined in build.gradle.

 

 

The default build.gradle that intellij creates does not support this out of the box like in the video.

1

Please sign in to leave a comment.