Last active
February 21, 2018 12:48
-
-
Save vialyx/49e43a0db64bc155e780f45c333f351b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TODO: Add Jacoco dependency | |
buildscript { | |
repositories { | |
google() | |
jcenter() | |
} | |
dependencies { | |
.......... | |
classpath "com.dicedmelon.gradle:jacoco-android:0.1.1" | |
// NOTE: Do not place your application dependencies here; they belong | |
// in the individual module build.gradle files | |
} | |
} | |
// TODO: Setup Sonarqube version | |
plugins { | |
id "org.sonarqube" version "2.6" | |
} | |
sonarqube { | |
properties { | |
property "sonar.projectKey", "com.medium.androidCodeCoverage" | |
property "sonar.projectName", "Android-MediumCodeCoverage" | |
property "sonar.projectVersion", "1.0" | |
property "sonar.exclusions", "robospice/**/*" | |
property "sonar.host.url", "http://192.168.0.1:9000" // TODO: - Setup your Sonarqube server address | |
property "sonar.sources", "src/main/java" | |
property "sonar.binaries", "build/intermediates/classes/debug" | |
property "sonar.java.binaries", "build/intermediates/classes/debug" | |
property "sonar.tests", "src/test/java, src/androidTest/java" | |
property "sonar.java.test.binaries", "build/intermediates/classes/debug" | |
def unit = fileTree(dir: project.projectDir, includes: ['**/*.exec']).files; | |
def ui = fileTree(dir: project.projectDir, includes: ['**/*.ec']).files; | |
unit.addAll(ui); | |
def files = unit.join(", "); | |
property "sonar.jacoco.reportPaths", files | |
property "sonar.java.coveragePlugin", "jacoco" | |
property "sonar.junit.reportsPath", "build/test-results/testDebugUnitTest" | |
property "sonar.android.lint.report", "build/reports/lint-results.xml" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment