I have a Java project with Gradle 2.1 and I want to upgrade the gradle version since the current version is too old. The below code works fine for gradle 2.13 and below. Here is the build.gradle file:
apply plugin: 'java'
repositories {
mavenCentral()
}
sourceSets {
test {
useTestNG()
}
}
dependencies {
compile group: 'org.testng', name: 'testng', version: '6.9.10'
}
However I get the below message when I upgrade to gradle 2.14:
"Could not find method useTestNG() for arguments [] on source set 'test' of type org.gradle.api.internal.tasks.DefaultSourceSet."
If I define test{} block outside sourceSets the error goes away. Not sure why.
Aucun commentaire:
Enregistrer un commentaire