user3393745
user3393745

Reputation: 51

Not able to get sonarqube to index files in my multi module gradle project

I have a multi-module gradle project created in android studio and want to run an analysis using sonarqube. The project structure is as below root (no source files) Module 1 com.myapp.module1 package1 package2

Module 2 (structure similar to that of Module 1)

I added the sonarqube plugin in the build.gradle file in root along with the following sonarqube properties: a) Host URL b) jdbc url c) Username for jdbc d) password for jdbc

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.

Upvotes: 2

Views: 1666

Answers (2)

Amal p
Amal p

Reputation: 3052

you dont have to put sonar.sources in each module

Check my answer in this link,it worked for me:

What is the correct way to configure an Android project with submodules for use with the sonarqube gradle plugin?

Upvotes: 0

user3393745
user3393745

Reputation: 51

I had to explicitly have sonar.sources property in each of the module.

sonarqube { properties { properties["sonar.sources"] += "src" } }

Upvotes: 3

Related Questions