On 12/03/2011, at 1:51 AM, Roger Studner wrote:

> often when i'm trying to "slap gradle on some old code" I do things like this:
> 
> sourceSets {
>     main {
>         java {
>             srcDir 'srv'
>             exclude '**/uncompilable/**'
>        }
>        
>        groovy {
>            srcDir 'java'
>        }
>    }
> }
> 
> then, when I see people/others scripts.. I see this (from a message just a 
> minute ago):
> configurations {
>     zipFile
> }
> 
> dependencies {
>  zipFile 'com.somewhere:zipfile:1.0@zip'
> }
> 
> is there then a default:
> configurations {
>    main
> }
> 
> (no, there is configurations compile)
> 
> The reason i'm asking.. is I have a project that has various folders like 
> this:
> unittest
> integrationtest
> 
> etc.. and the intergration test "folder" which has that type of test.. .has 
> some classpath things it seems (thus, a "configuration")..
> 
> but this is also, technically a "sourceSet" no?

I would treat them as source sets. They're not really configurations. A 
configuration is simply a set of dependencies. What you've got there is several 
groups of source code, with each group having its own compile and runtime 
dependencies. In other words, you've got several source sets there.


> 
> I'm just trying to figure out how to have separate testing folders.. with 
> separate classpath/dependencies.. just can't seem to find this "example" in a 
> complete form..though I do realize the user guide has all the parts spread 
> out in it
> 
> Any thoughts/examples would be great

Have a look at the sample in $gradleHome/samples/java/withIntegrationTests in 
the Gradle distribution.


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

Reply via email to