Thu*_*ake 3 gradle sonarqube azure-devops azure-pipelines
我尝试在天蓝色管道上使用 sonarcube 配置代码分析。当我运行管道时,我遇到了这样的错误。
错误:“类型‘org.sonarqube.gradle.SonarQubeTask’属性‘pluginVersion’是私有的并用@Internal注释。”
Task:sonarqube FAILED
WARNING:API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'.
It will be removed in version 7.0 of the Android Gradle plugin.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getJavaCompile(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':sonarqube' (type 'SonarQubeTask').
- Type 'org.sonarqube.gradle.SonarQubeTask' property 'pluginVersion' is private and annotated with @Internal.
Reason: Annotations on private getters are ignored.
Possible solutions:
1. Make the getter public.
2. Annotate the public version of the getter.
Please refer to https://docs.gradle.org/7.0.2/userguide/validation_problems.html#private_getter_must_not_be_annotated for more details about this problem.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 6m 34s
78 actionable tasks: 78 executed
Run Code Online (Sandbox Code Playgroud)
在进行构建时,我遇到了以下问题。
类型“org.sonarqube.gradle.SonarQubeTask”属性“pluginVersion”是私有的并用@Internal注释
当您使用最新版本的 gradle(7.x) 和旧版本的 sonarqube-gradle-plugin 时,会出现上述错误
要修复该错误,请使用 3.3 版本sonarqube-gradle-plugin
请在项目级别的 build.gradle 中使用以下行:
类路径 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3'
归档时间: |
|
查看次数: |
4533 次 |
最近记录: |