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

huangapple go评论53阅读模式
英文:

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

问题

在尝试使用Gradle Wrapper 8.2.1从Java v11升级到Java v17时,出现以下错误消息:

> 无法为类型为org.gradle.api.tasks.testing.junitplatform.junitplatformoptions的对象设置未知属性'binresultsdir'

引发错误的tests.gradle文件代码如下:

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

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")

答案1

得分: 0

已弃用的 binResultsDir 在 Gradle 8.X 版本中已移除,考虑使用 binaryResultsDirectory: DirectoryProperty 属性代替。

阅读更多:https://docs.gradle.org/current/dsl/org.gradle.api.tasks.testing.Test.html#N30D2A

英文:

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

huangapple
  • 本文由 发表于 2023年7月12日 22:14:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/76671533.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定