Quantcast
Channel: JetBrains Developer Community : All Content - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5481

How can I make IDEA recognize my generated sources using Gradle?

$
0
0

This isn't specifically a Gradle question, but that's what I'm using as my build tool, so it's relevant.  I'm having the same problem as these people:

 

http://devnet.jetbrains.com/message/5318044#5318044

http://devnet.jetbrains.com/message/5475874#5475874

http://issues.gradle.org/browse/GRADLE-1174

 

Once I exclude the 'build' directory from a project module, it's impossible for me to get IDEA to pick up any sources underneath that directory.  The GUI makes it look like it's going to do what I want, but it doesn't.  I'll attach a couple screenshots.

 

idea-generated-sources-1.PNG

 

idea-generated-sources-2.PNG

 

In the first screenshot you can see that 'generated-sources/thrift' is marked as a source folder.  However, I have to manually remove the 'build' folder from the excludes list before IDEA will pick up any sources in the 'generated-sources/thrift' folder.  Since the sources are generated I would prefer if I could keep them hidden from the project view.

 

In my opinion the GUI is indicating things are going to behave the way I want, but the excludes always override my source folders.  If it's supposed to be impossible to use a sub-directory of an excluded folder as a source folder, the GUI shouldn't let me select both at the same time.


Viewing all articles
Browse latest Browse all 5481

Trending Articles