Adam Murdoch-3 wrote:
>
>
> Some options:
>
> option 1 - explicitly list all the included packages:
>
> sourceSets.main.java {
> srcDir 'src'
> include 'domain/client/**/shared/*'
> include 'domain/server/**'
> }
>
> option 2 - replicate the Gradle 0.7 behaviour:
>
> sourceSets.main.java {
> srcDir 'src'
> exclude 'domain/client/**'
> }
>
> compileJava {
> options.compileArgs << ['-sourcepath', file('src').absolutePath]
> }
>
> option 3 - use an exclude predicate:
>
> sourceSets.main.java {
> srcDir 'src'
> exclude { FileTreeElement e -> e.path.startsWith('domain/client/') &&
> ! e.path.contains('/shared/') }
> }
>
>
> --
> Adam Murdoch
> Gradle Developer
> http://www.gradle.org
> CTO, Gradle Inc. - Gradle Training, Support, Consulting
> http://www.gradle.biz
>
>
>
Thanks. I went with option 2 but couldn't get the above version to work.
I used:
compileJava.options.compilerArgs = ['-sourcepath', file('src').absolutePath]
For some reason the version you suggested to put in the task definition did
not see the [] as an array and passed the brackets through as part of the
compiler args. Javac did not then regonize the [] as a valid args.
Thanks again for putting me on the right path.
Chris....
--
View this message in context:
http://gradle.1045684.n5.nabble.com/Compile-Java-Exclude-some-include-some-via-reference-tp3286784p3287074.html
Sent from the gradle-user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email