英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论