• <legend id='IV5O3'><style id='IV5O3'><dir id='IV5O3'><q id='IV5O3'></q></dir></style></legend>

      <tfoot id='IV5O3'></tfoot>
        <bdo id='IV5O3'></bdo><ul id='IV5O3'></ul>

      1. <small id='IV5O3'></small><noframes id='IV5O3'>

      2. <i id='IV5O3'><tr id='IV5O3'><dt id='IV5O3'><q id='IV5O3'><span id='IV5O3'><b id='IV5O3'><form id='IV5O3'><ins id='IV5O3'></ins><ul id='IV5O3'></ul><sub id='IV5O3'></sub></form><legend id='IV5O3'></legend><bdo id='IV5O3'><pre id='IV5O3'><center id='IV5O3'></center></pre></bdo></b><th id='IV5O3'></th></span></q></dt></tr></i><div id='IV5O3'><tfoot id='IV5O3'></tfoot><dl id='IV5O3'><fieldset id='IV5O3'></fieldset></dl></div>

        适用于 Android 的多模块项目的 SonarQube

        时间:2023-07-09
              <legend id='iZZnM'><style id='iZZnM'><dir id='iZZnM'><q id='iZZnM'></q></dir></style></legend>
              <i id='iZZnM'><tr id='iZZnM'><dt id='iZZnM'><q id='iZZnM'><span id='iZZnM'><b id='iZZnM'><form id='iZZnM'><ins id='iZZnM'></ins><ul id='iZZnM'></ul><sub id='iZZnM'></sub></form><legend id='iZZnM'></legend><bdo id='iZZnM'><pre id='iZZnM'><center id='iZZnM'></center></pre></bdo></b><th id='iZZnM'></th></span></q></dt></tr></i><div id='iZZnM'><tfoot id='iZZnM'></tfoot><dl id='iZZnM'><fieldset id='iZZnM'></fieldset></dl></div>
                <tbody id='iZZnM'></tbody>

                  <bdo id='iZZnM'></bdo><ul id='iZZnM'></ul>
                  <tfoot id='iZZnM'></tfoot>

                  <small id='iZZnM'></small><noframes id='iZZnM'>

                  本文介绍了适用于 Android 的多模块项目的 SonarQube的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我浏览过很多文章和帖子,但遗憾的是,我似乎没有一篇清楚.我想为我的 android 项目集成 sonarqube.我的项目结构如下:

                  I have been through many articles and posts and sadly not a single one seems clear to me. I want to integrate sonarqube for my android project. The structure of my project is as below:

                  最初,我按照此处提到的方式设置了一个 sonarqube.gradle:配置带有子模块的 Android 项目以与 sonarqube gradle 插件一起使用的正确方法是什么?

                  Initially, I had setup a single sonarqube.gradle the way it is mentioned here:What is the correct way to configure an Android project with submodules for use with the sonarqube gradle plugin?

                  但它为我做的是用它处理的最后一个模块覆盖数据.这意味着我在 sonarqube 登录中仅看到域的代码行.如果我不添加 apply from: '../sonarqube.gradle'在域中然后我可以看到数据库的代码.如果我没有在数据库和域中添加 apply from: '../sonarqube.gradle' ,那么我会看到它的数据.所以我认为它会覆盖日志.

                  But what it is doing for me is overwriting the data with the last module it processed. Which means I see code line in sonarqube login for only domain. If I do not add apply from: '../sonarqube.gradle' in domain then I can see code for database. If I do not add apply from: '../sonarqube.gradle' in database and domain then I see it for data. So I am thinking its overwriting the logs.

                  有人可以帮助我了解在 Android 中为多模块项目设置 sonarqube 的正确方法是什么?

                  Can someone help me to understand what is the right way to setup sonarqube for multimodule project in Android?

                   apply plugin: "org.sonarqube"
                  
                  sonarqube {
                    properties {
                        property "sonar.projectName", "my-app"
                        property "sonar.projectKey", "my-app"
                        property "sonar.host.url", "URL"
                        property "sonar.sources", "./src/main/"
                        property "sonar.sourceEncoding", "UTF-8"
                        property "sonar.language", "kotlin"
                        property "sonar.login", "token"
                        property "sonar.projectVersion", "1.0"
                        property "sonar.analysis.mode", "publish"
                        property "sonar.android.lint.report", "./build/outputs/lint-results-debug.xml"
                        property "sonar.exclusions", "**/BuildConfig.class,**/R.java,**/R$*.java,src/main/gen/**/*,src/main/assets/**/*"
                    }
                  }
                  

                  推荐答案

                  移除 projectKey 属性,只在根 build.gradle 中声明:

                  Remove the projectKey property and declare it only inside the root build.gradle:

                   apply plugin: "org.sonarqube"
                  
                  sonarqube {
                    properties {
                        property "sonar.projectName", "my-app"
                        property "sonar.host.url", "URL"
                        property "sonar.sources", "./src/main/"
                        property "sonar.sourceEncoding", "UTF-8"
                        property "sonar.language", "kotlin"
                        property "sonar.login", "token"
                        property "sonar.projectVersion", "1.0"
                        property "sonar.analysis.mode", "publish"
                        property "sonar.android.lint.report", "./build/outputs/lint-results-debug.xml"
                        property "sonar.exclusions", "**/BuildConfig.class,**/R.java,**/R$*.java,src/main/gen/**/*,src/main/assets/**/*"
                    }
                  }
                  

                  这篇关于适用于 Android 的多模块项目的 SonarQube的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Fastlane “nokogiri 需要 Ruby 版本 >= 2.3.0."错误 下一篇:SonarQube 无法解析包含任何故障的 TEST-report.xml

                  相关文章

                    <legend id='FMHG8'><style id='FMHG8'><dir id='FMHG8'><q id='FMHG8'></q></dir></style></legend>
                      <bdo id='FMHG8'></bdo><ul id='FMHG8'></ul>

                  1. <tfoot id='FMHG8'></tfoot>

                      <small id='FMHG8'></small><noframes id='FMHG8'>

                      <i id='FMHG8'><tr id='FMHG8'><dt id='FMHG8'><q id='FMHG8'><span id='FMHG8'><b id='FMHG8'><form id='FMHG8'><ins id='FMHG8'></ins><ul id='FMHG8'></ul><sub id='FMHG8'></sub></form><legend id='FMHG8'></legend><bdo id='FMHG8'><pre id='FMHG8'><center id='FMHG8'></center></pre></bdo></b><th id='FMHG8'></th></span></q></dt></tr></i><div id='FMHG8'><tfoot id='FMHG8'></tfoot><dl id='FMHG8'><fieldset id='FMHG8'></fieldset></dl></div>