On 12/07/2011, at 2:20 AM, John Murph wrote:

> On Mon, Jul 11, 2011 at 11:59 AM, Szczepan Faber <[email protected]> wrote:
> My personal preference would to steer the model towards what Adam
> suggests but not let the scope creep. I don't think many-to-many
> project mapping is a requirement for a good IntelliJ integration (or
> eclipse integration). I think whatever engineering path we take we
> should make sure we are able to work on important items first,
> potentially leaving some less important feats for later.
> 
> 
> I'm not sure that many-to-many is needed, but one-to-many is certainly 
> needed.  Gradle has great flexibility in allowing multiple source sets, 
> however, IDEA does not support this in the module concept.  In order to map 
> this, we need to be able to create multiple IML files for one Gradle project. 
>  I've posted about this need several times, and I know we cannot be the only 
> ones to need this.

We've made some small steps in this direction in 1.0-milestone-4. Now, an 
IdeaProject instance's set of modules are of type IdeaModule. Previously, they 
were of type (Gradle) Project, which pretty much forced a one-to-one mapping 
between Gradle project and IDEA module. Now, in theory, you can map a Gradle 
project to multiple IDEA modules. Unfortunately, we don't yet provide any good 
way to construct IdeaModule instances, so it won't be particularly easy to do 
this mapping. If we added (say) a factory method, then it would be easy to 
customise the mapping. Even moreso if we provided a way to create an IDEA 
module from a SourceSet instance.

It might also be worth considering an option in the IDE plugins to map each 
custom source set to a separate Eclipse project or IDEA module.  This might 
even be a good default behaviour.


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com

Reply via email to