On 5/06/10 4:53 AM, Paul Speed wrote:
And actually, what's really odd is that we have to specify both at all.

subprojects.each { subproject ->
        source subproject.sourceSets.main.java

        if( classpath )
classpath += subproject.sourceSets.main.classes + subproject.sourceSets.main.compileClasspath
        else
classpath = subproject.sourceSets.main.classes + subproject.sourceSets.main.compileClasspath
    }

I wonder if gradle could take just the sourceSets.main in the example above and do the smart thing. (It doesn't.) It seems like this is probably a pretty common pattern when self-specifying the sources.

This is a good idea. There are quite a few places where we can do this sort of thing. For example, adding a source set to Compile.source could add the source set's compileClasspath to Compile.classpath, similar to the above. Or adding a dependency on a source set adds in the source set's classes (or maybe the jar) and runtimeClasspath.


--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to