SonarQube with Codemagic

I am using Developer Version of SonarQube and want to integrate it with Codemagic for my native Android app, but receiving errors. Can someone help me!

I also tried the below documentation

But SonarScanner is not required for gradle check.

Getting error:

Task :app:sonarqube FAILED
SonarQube server [http://localhost:9000] can not be reached

Hi,

It sounds like you didn’t provide a sonar.host.url value and analysis defaulted to trying to find SonarQube on localhost.

 
HTH,
Ann

Hi Ann, still receiving the same error

I tried different urls but still getting error:

./gradlew sonarqube -Dsonar.projectKey=$Prj_key -Dsonar.host.url=http://sonar-server:9000 -Dsonar.login=$SONAR_TOKEN

How to determine the host url?

I am using my computer’s ip address as sonar.host.url. Still getting the same error

Hi,

Where is your SonarQube instance located? If it’s on the same machine you’re running analysis on, then defaulting to localhost:9000 or using your host IP address is fine. If it’s not, then you need to provide the address of the machine hosting SonarQube.

 
HTH,
Ann