Regarding testClassesDir

44 views
Skip to first unread message

Kuzhali Velmurugan

unread,
Jan 18, 2019, 4:25:56 AM1/18/19
to gradle-dev
Hi,

Below is part my gradle config for a test project. The project structure has been changed as src/test/java to support allure report. 

def commonTestConfiguration = {
useTestNG()
/* classpath = files(
sourceSets.main.runtimeClasspath,
sourceSets.main.compileClasspath
)*/
testClassesDir = sourceSets.test.output.classesDir [---> throws error when using gradle 5]
outputs.upToDateWhen { false }
testLogging {
// Shows the status of the tests in the command-line output

events 'started', 'passed', 'failed', 'standardOut', 'standardError'
exceptionFormat 'full'
}
}

task runContinuousIntegrationInChrome(type: Test, dependsOn: check) {
configure commonTestConfiguration
options.suites "src/test/resources/testng_continuousintegration_chrome.xml"
}

Getting error as ClassesDir has been deprecated. Am not sure how it needs to be modified.

Kindly let me know, how it should be changed to make it run with gradle 5

Thanks,
Kuzhali

Sterling Greene

unread,
Jan 18, 2019, 9:03:01 AM1/18/19
to gradl...@googlegroups.com
Hi Kuzhali,

Please use our forums to ask for help with Gradle. https://discuss.gradle.org/

In your case, that particular property was replaced by plural versions of the property: testClassesDirs and classesDirs https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html#org.gradle.api.tasks.testing.Test:testClassesDirs

HTH


--
You received this message because you are subscribed to the Google Groups "gradle-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gradle-dev+...@googlegroups.com.
To post to this group, send email to gradl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gradle-dev/90e8b2fd-a1f7-43ec-938a-171d21d0911e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--


Email-Signature@2x.png

Sterling Greene

Lead Software Engineer

Gradle

W. gradle.com


Reply all
Reply to author
Forward
0 new messages