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.
@@ -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')
