A project named "app" ignores sonar-project.properties

I’m using CircleCI to build for SonarCloud, analyzing a Kotlin app. After the first analysis, I had to “rename” the main branch in SonarCloud from ‘master’ to ‘develop’.

In my sonar-project.properties file I have this line with actual info in it:

sonar.projectName=<project number> <customer> <project name>

e.g.

sonar.projectName=19253 TacoHut Mobile Ordering App

But on the SonarCloud web site the project is named “MyOrg / app”, i.e. the directory the app source is in at /source/app in the repository.

I’ve tried putting the file at the top of the repository as well as in the source directory, but SonarCloud has not updated the project name.

How do I get it to name it as desired on the SonarCloud web site?

Hey there.

What tool are you using to execute SonarCloud analysis? The vanilla Scanner CLI, the Scanner for Maven, Gradle…?

I’m using a job in to the CircleCI build config.yml file, using a run step of:

cd source
./gradlew build sonarqube

on the CircleCI circleci/android@2.0.3 orb. The gradle file uses plugin id “org.sonarqube” version “3.4.0.2513”, and the sonarqube gradle config includes the properties “sonar.projectKey”, “sonar.organization”, and “sonar.host.url”

Take a look at this thread:

1 Like

Thanks! Moving the setting from the .properties file into the Gradle file seems to have worked.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.