gradlebuild.gradlegradle-plugin

Could not set unknown property 'binresultsdir' for object of type org.gradle.api.tasks.testing.junitplatform.junitplatformoptions


Getting error message while trying to upgrade java v17 from java v11 using Gradle Wrapper 8.2.1

Could not set unknown property 'binresultsdir' for object of type org.gradle.api.tasks.testing.junitplatform.junitplatformoptions

tests.gradle file code for which error is thrown:

binResultsDir = file("$buildDir/test-results/acceptanceTest-${profile}-${label}/binary")

Solution

  • Deprecated binResultsDir has been removed in 8.X versions of Gradle, consider using binaryResultsDirectory: DirectoryProperty property instead.

    Read more: https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html#N30D2A