gpt4 book ai didi

gradle - 类型 'org.sonarqube.gradle.SonarQubeTask' 属性 'pluginVersion' 是私有(private)的并且用@Internal 注释

转载 作者:行者123 更新时间:2023-12-05 08:46:53 31 4
gpt4 key购买 nike

我尝试在 azure 管道上使用 sonarcube 配置代码分析。当我运行管道时,我遇到了这样的错误。

错误:“类型‘org.sonarqube.gradle.SonarQubeTask’属性‘pluginVersion’是私有(private)的并用@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

最佳答案

在进行构建时,我遇到了以下问题。

类型 'org.sonarqube.gradle.SonarQubeTask' 属性 'pluginVersion' 是私有(private)的并用@Internal 注释

当您使用最新版本的 gradle(7.x) 和旧版本的 sonarqube-gradle-plugin 时会出现上述错误

修复bug请使用3.3版本sonarqube-gradle-plugin

请在项目级 build.gradle 使用以下行:

类路径'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3'

关于gradle - 类型 'org.sonarqube.gradle.SonarQubeTask' 属性 'pluginVersion' 是私有(private)的并且用@Internal 注释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68798532/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com