java - Could not find method configFailurePolicy() for arguments [continue] on org.gradle.api.tasks.testing.testng.TestNGOptions_Decorated@ae0471c -


i want set configfailurepolicy = continue in testng because whenever @before or @after class fails tests after getting skipped. need make changes in testng well?

this build.gradle file:

apply plugin: 'java' defaulttasks = ['deploy'] /*  * task generate gradle wrapper artifacts.  * required update wrapper , not  * needed regular builds.  */  task wrapper(type: wrapper) {     gradleversion = '2.3'     distributionurl = "http://services.gradle.org/                        distributions/gradle-2.3-bin.zip" }  test {     usetestng() {         configfailurepolicy 'continue'         // includegroups 'mytestgroup'     } }  repositories {     maven {         url "http://x.x.x.x:8081/nexus/content/groups/public"     } }