1
0
mirror of https://github.com/wulkanowy/wulkanowy.git synced 2024-11-23 19:26:31 -06:00
wulkanowy-mirror/android-sonarqube.gradle

37 lines
1.5 KiB
Groovy
Raw Normal View History

2017-11-26 09:32:33 -06:00
apply plugin: 'org.sonarqube'
sonarqube {
//noinspection GroovyAssignabilityCheck
properties {
def files = fileTree("${rootProject.projectDir}/api/build/libs/").filter { it.isFile() }.files.name
2018-04-08 10:14:59 -05:00
def libraries = project.android.sdkDirectory.getPath() + "/platforms/android-26/android.jar," +
2017-11-26 09:32:33 -06:00
"${project.rootDir}/api/build/libs/" + files[0]
property "sonar.projectName", GROUP_ID + ":app"
property "sonar.projectKey", GROUP_ID + ":app"
property "sonar.sources", "src/main/java"
property "sonar.exclusions", "build/**,**/*.png,*.iml, **/*generated*," +
"src/**/entities/*.java, src/androidTest/**/entities/*.java"
property "sonar.import_unknown_files", true
// Defines where the java files are
property "sonar.binaries", "build/intermediates/classes/debug"
property "sonar.libraries", libraries
// Defines where the xml files are
property "sonar.java.binaries", "build/intermediates/classes/debug"
property "sonar.java.libraries", libraries
// Analyze tests classes
property "sonar.tests", "src/test/java, src/androidTest/java"
property "sonar.java.test.binaries", "build/intermediates/classes/debug"
property "sonar.java.test.libraries", libraries
property "sonar.java.coveragePlugin", "jacoco"
property "sonar.android.lint.report", "build/reports/lint-results.xml"
property "sonar.jacoco.reportPaths", fileTree(dir: project.projectDir, includes: ['**/*.exec', '**/*.ec'])
}
}