It's the same syntax.

To set it for all Java and Groovy compile tasks:

tasks.matching { it instanceof Compile || it instanceof GroovyCompile }.all {
    options.compilerArgs << "-Xlint:unchecked"
}


On 28/09/2011, at 5:20 PM, phil swenson wrote:

> anyway to do this for groovy?
> 
> thanks
> phil
> 
> On Fri, Sep 2, 2011 at 11:51 AM, Luke Daley <[email protected]> wrote:
>> 
>> On 30/08/2011, at 5:47 PM, phil swenson wrote:
>> 
>>> Is there a way to break a gradle build if there is a compile warning?
>>> People are ignoring the compiler warnings, and this would be a stop to
>>> it :)
>> 
>> This should work:
>> 
>> compileJava {
>>        options.compilerArgs << "-Werror"
>> }
>> 
>> Inspiration taken from this SO post: 
>> http://stackoverflow.com/questions/1040074/javac-treat-warnings-as-errors
>> 
>> --
>> Luke Daley
>> Principal Engineer, Gradleware
>> http://gradleware.com
>> 
>> 
>> ---------------------------------------------------------------------
>> 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
> 
> 

-- 
Luke Daley
Principal Engineer, Gradleware 
http://gradleware.com


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

    http://xircles.codehaus.org/manage_email


Reply via email to