Issue in Sonarqube integration with gitlab repository(build on gradle in android)

$ gradle sonar
Welcome to Gradle 5.4.1!
Here are the highlights of this release:

  • Run builds with JDK12
  • New API for Incremental Tasks
  • Updates to native projects, including Swift 5 support
    For more details see Gradle 5.4.1 Release Notes
    Starting a Gradle Daemon (subsequent builds will be faster)
    Configuration on demand is an incubating feature.
    FAILURE: Build failed with an exception.
  • What went wrong:
    A problem occurred configuring project ‘:indiaMARTApp’.

SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project’s local properties file at ‘/builds/indiamart/android/android-im/local.properties’.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  • Get more help at https://help.gradle.org
    BUILD FAILED in 2m 1s
    Cleaning up project directory and file based variables
    00:01
    ERROR: Job failed: exit code 1

unnamed (2)

Hey there.

Are you able to run a gradle build?

Hi,
I want to integrate sonarqube with gitlab for android without installing android-sdk on gitlab is it possible?

You’ll need to be able to complete a successful build, so installing the SDK for your project is probably a prerequisite for that. That’s why I asked:

I am not able to build gradle as I have not installed android-sdk on gitlab as it consumes a large space. with sonarqube I want to scan my java files of android only so is it possible that I can use sonarqube for that on gitlab without installing android sdk?

Hi,

As I wanted to scan only java files of android project using sonarqube so can we do this without installing android-sdk in gitlab?

Hey there.

Your SonarQube analysis relies on a successful build. You will need to be able to build your code in Gitlab, which implies having the android-sdk installed.