Gradle module with 2 source dirs

Answered

I have a gradle project with 2 sub projects:

Faas

  api

  service

(The root project is empty project)

The service depends on api.

In the service sub project i am using apt to generate classes based in interface in the service sub project and classes from the api sub project.

 

So i need to add the generated sources to my service sub project source sets.

In the old IDEA it was working fine, with the new gradle integration i could not find any way to achive this

 

 

3 comments

OK, after some research I think I found the source of the problem. in IDEA 15, when I was using apt plugin i was marking the build/generated/ as a generated sources directory if my module. Now with the new gradle in IDEA 16, i have 2 modules for that module. One for the main source code and one for the generated one, This is not working as the generated code needs the code in the main module.

 

0

Please sign in to leave a comment.