---
# System prepended metadata

title: Sonaque Quality Chek

---

# Sonaque Quality Chek 

### How to integrate?

#### Project build.gradle

```
add : maven { url "https://plugins.gradle.org/m2/" }
add :  classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3"

Ex: 
repositories {
    mavenCentral()
    jcenter()
    google()
    maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
        classpath "com.android.tools.build:gradle:4.1.3"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.3"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
```
#### App build.gradle

```
Add : id 'org.sonarqube' and sonaqube property


Ex : 
plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'kotlin-android-extensions'
    id 'kotlin-kapt'
    id 'org.sonarqube'
}

sonarqube {
    properties {
        property "sonar.projectName", "Endline"
        property "sonar.projectKey", "el"
        property "sonar.host.url", "http://localhost:9000"
        property "sonar.language", "java"
        property "sonar.sources", "src/main/java"
        property "sonar.java.sources", "src/main/java"
        property "sonar.sourceEncoding", "UTF-8"
        property "sonar.login", "admin"
        property "sonar.password", "P@ss@123"
    }
}
```


```
To add project to sonaqube, go to root project then

./gradlew sonarqube -Dsonar.host.url=http://localhost:9000/



```