Use explicit test classes output dir for configuring test task

This allows the build to run with Gradle 4.1 as well, where oldTestTask.testClassesDir will return null
at configuration time.
This commit is contained in:
Yannick Welsch 2017-08-21 14:55:23 +09:30
parent 96b0d3e0cc
commit 41f81e2279

View File

@ -61,7 +61,7 @@ class RandomizedTestingPlugin implements Plugin<Project> {
]
RandomizedTestingTask newTestTask = tasks.create(properties)
newTestTask.classpath = oldTestTask.classpath
newTestTask.testClassesDir = oldTestTask.testClassesDir
newTestTask.testClassesDir = oldTestTask.project.sourceSets.test.output.classesDir
// hack so check task depends on custom test
Task checkTask = tasks.findByPath('check')