Importing "fullstack" gradle project

Hi, 

We are developing in a fullstack project with idea ultimate. 

We build a spring application on the server side. The client is written in typescript.

Our structure on disk looks as follows:

* project
** client // common client modules, code is written in TS and build with yarn
*** clientModuleA
**** src
**** test
*** ...
** server // common server modules and build with gradle
*** serverModuleA
**** src/main/java
**** src/test
*** ...
** applications // various applications to start, all have a client and a server part
*** app1
**** client // build with yarn
***** src
***** test
**** server // build with gradle
***** src/main/java
***** src/test

Our primary build tool is gradle. The client parts are built with yarn where yarn is called from gradle.

We face major problems when we import this setup to idea as a gradle plugin.

First of all, we haven't figured out a way to let idea know that the client/src and client/test folders should be treated as source folders. How would we do that?

Second, the node_modules folder created by yarn is constantly indexed by idea. It never stops indexing and thus idea is completely unusable. If I manually exclude the node_modules, then at least the indexing stops and I can work on the java part. Again, we did not figure out a way of marking this folder as excluded during the import.

In 2018.2 this indexing problem did not show up. 

Currently we need to manually maintain the .iml files and check them into the repository. This is a big mess and with every update of a dependency those files change. With the update to 2018.3 it got even more painful.

I am puzzled that I cannot find an example for such a project setup. In the days of microservices and fullstack I would have guessed others have a similar setup. 

What is the best way to approach this problem?

0

Please sign in to leave a comment.