> Could not set unknown property 'testClassesDir' for task ':systemtestRun' of type org.gradle.api.tasks.testing.Test

I’m updating the gradle version of my application, it was with version 2.3 and I’m going to 6.7.1

I changed some things, of course, but this error I’m not able to resolve:

> Could not set unknown property 'testClassesDir' for task ':systemtestRun' of type org.gradle.api.tasks.testing.Test.

build.gradle:

task systemtestRun(type: Test) {
	description 'run tests'
	testClassesDir = sourceSets.systemtest.output.classesDirs
    classpath = sourceSets.systemtest.runtimeClasspath + sourceSets.test.runtimeClasspath
}

https://docs.gradle.org/6.7.1/userguide/upgrading_version_4.html#changes_5.0

The testClassesDir property has been removed from the Test task — use testClassesDirs instead.