Steps to reproduce : Commit code to Github, CircleCI Build starts, Analysis on Sonar Cloud
Potential workaround : None identified
Hello Team,
The application name of our Android project was previously reflecting correctly on SonarCloud Portal, but now the name is different. It takes the name of root folder automatically. Kindly help us resolve this issue. How can we reflect the original application name, instead of application’s root directory name.
Please find attached the screenshot. At the top left, where ‘app’ is displayed, previously, it used to be ‘android-mobile-app’. How do I change the name back to ‘android-mobile-app’.
I’ve had the same issue, but you can change the project name in your Gradle file.
Just add the property sonar.projectName to the sonarqube section with your required project name and it will start showing up with that name instead of app.
To add on to @Piro’s excellent response (it is indeed possible to “force” sonar.projectName), the SonarScanner for Gradle is picking up defaults, in this case using ${project.name} as the value passed to sonar.projectName.
To @KanishakCharitableIm – I would reccomend making sure this value hasn’t changed (it probably sits in your settings.gradle file)