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.

-Paul

Paul Speed wrote:
I chose to keep them different hoping that one day classpath might be fixed to work "right". That way every time I look at that task I can think: "Now why did I do this differently?" :)

-Paul

Spencer Allain wrote:

I considered using the simple source xyz form, but didn't like that it was asymmetric with assigning classpath, so I made them look the "same".

-Spencer




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

   http://xircles.codehaus.org/manage_email




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

   http://xircles.codehaus.org/manage_email


Reply via email to