Tasks could indicate that they generate sources. Then you'd interpret their output directories (if any) as "generated source". That would to identify and distinguish between output dies that contain sources of some sort (might need production/test distinction too for proper IDE intg).
The tricky part for IntelliJ is that you would really have to list out each and every directory under buildDir that has to be excluded individually. And obviously just looking at existing directories is not going yo be enough. This really needs to come from the tasks in some fashion (or manually from the user of course). It is really ashame they do not let you exclude a directory but then "opt back in" one ir more of that directory's sub-dirs. No idea about eclipse. On May 10, 2011 8:56 PM, "Adam Murdoch" <[email protected]> wrote: > > On 10/05/2011, at 11:57 PM, Steve Ebersole wrote: > >> +1 to this whole branch of discussion. This is exactly the convention we decided on in the Hibernate build. We generate various types of sources; some production (main), some test. In fact we decided on a single grouping directory under {buildDir} also to keep things "neat". But we also split out the various types of things being generated. So we end up with directories such as (we use 'target' instead of 'build'): >> target/generated-src/logging/main >> target/generated-src/antlr/main >> target/generated-src/jpamodelgen/test >> >> This has worked great for us. Except of course IDE project generation. >> > This is a good point. And one we don't have a good solution for yet. There are 2 things we want to configure the IDE to do, but they conflict with each other. First, we want to treat generated source directories as source directories in the IDE. Second, we want to exclude everything under build/ from the IDE, as most of it is either not interesting or an annoyance in the IDE. > > The problem is, in IDEA at least, that the exclusion of build/ also excludes the generated source directories under build/. Anyone have any suggestions for how we might configure IDEA to make this work? How about Eclipse? > > > -- > Adam Murdoch > Gradle Co-founder > http://www.gradle.org > VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting > http://www.gradleware.com >
