问题描述
我在Android Studio中创建一个多模块项目的gradle并想用sonarqube运行的分析。该项目结构如下
根(没有源文件)
模块1
com.myapp.module1
包1
包2
I have a multi-module gradle project created in android studio and want to run an analysis using sonarqube. The project structure is as belowroot (no source files) Module 1 com.myapp.module1 package1 package2
Module 2 (structure similar to that of Module 1)
我加入与下列sonarqube属性沿着根的build.gradle文件sonarqube插件:
A)主机URL
B)JDBC URL
三)用户名的JDBC
d)对于JDBC密码
I added the sonarqube plugin in the build.gradle file in root along with the following sonarqube properties: a) Host URLb) jdbc urlc) Username for jdbcd) password for jdbc
我用gradlew的构建。当我从我的根目录下运行gradlew sonarqube,sonarqube运行,但表示0文件被编入索引的所有模块。
I use gradlew for the build. When I run gradlew sonarqube from my root directory, sonarqube runs but indicates that 0 files are indexed for all the modules.
我缺少的是在这里吗?它应该是相当明显的,但我一直没能找到在现有的计算器档案答案。
What am I missing here? It should be something fairly obvious but I have not been able to find an answer in the existing stackoverflow archives.
推荐答案
我必须明确有sonar.sources在每个模块的属性。
I had to explicitly have sonar.sources property in each of the module.
sonarqube {
}
性能{
性能[sonar.sources] + =SRC
}
这篇关于没能获得sonarqube索引文件在我的多模块项目的gradle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!