Gradle failOnError for default ant task

500 Views Asked by At

Ive the following gradle snippet.

defaultTasks = ['init', 'run']

task init() {

    ant {
        property(file: 'run.properties')
    }
    ant.importBuild "build.xml"

}

The issue is, whenever the deault task run executed from my build.xml fails gradle doesnt recognize this as a failure. Is there a way I can set a failOnError for the default task?

1

There are 1 best solutions below

0
Opal On

I'm not sure but this might work:

ant.failOnError = true