On 24/11/2010, at 9:15 AM, omax wrote:

> 
> Hello,
> 
> I have usual setup of my sourceSets as following:
> 
> sourceSets {
>       main {
>               java {
>                       srcDir 'src'
>               }
>       }
> }
> 
> But some java sources are not compilable and I would like to exclude them.
> Is there any easy way to do it with gradle?

Yes. You can do this:

sourceSets {
    main {
        java {
            srcDir 'src'
            exclude '**/uncompilable/**'
       }
   }
}


> 
> I could do it with Maven using standard excludes as following:
> 
>            <plugin>
>                <artifactId>maven-compiler-plugin</artifactId>
>                <configuration>
>                    <excludes>
>                        <exclude>**/uncompilable/**</exclude>
>                    </excludes>
>                </configuration>
>             </plugin>
> 
> -- 
> View this message in context: 
> http://gradle.1045684.n5.nabble.com/Exclude-some-java-classes-packages-from-compilation-sourceSets-tp3277622p3277622.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
> 
> 


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

Reply via email to