You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
1.8 KiB
69 lines
1.8 KiB
plugins {
|
|
id "org.sonarqube" version "2.6.2"
|
|
id "jacoco"
|
|
id "java"
|
|
id "idea"
|
|
}
|
|
|
|
allprojects {
|
|
apply plugin: 'java'
|
|
apply plugin: 'jacoco'
|
|
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
|
|
jacoco {
|
|
toolVersion = '0.8.1'
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
dependencies {
|
|
testCompile 'junit:junit:4.11'
|
|
}
|
|
|
|
jacocoTestReport {
|
|
additionalSourceDirs = files(sourceSets.main.allSource.srcDirs)
|
|
sourceDirectories = files(sourceSets.main.allSource.srcDirs)
|
|
classDirectories = files(sourceSets.main.output)
|
|
reports {
|
|
html.enabled = true
|
|
xml.enabled = true
|
|
csv.enabled = false
|
|
}
|
|
}
|
|
}
|
|
|
|
task jacocoRootReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
|
|
dependsOn = subprojects.test
|
|
additionalSourceDirs = files(subprojects.sourceSets.main.allSource.srcDirs)
|
|
sourceDirectories = files(subprojects.sourceSets.main.allSource.srcDirs)
|
|
classDirectories = files(subprojects.sourceSets.main.output)
|
|
executionData = files(subprojects.jacocoTestReport.executionData)
|
|
reports {
|
|
xml.enabled true
|
|
xml.destination "${buildDir}/reports/jacoco/report.xml"
|
|
html.enabled false
|
|
csv.enabled false
|
|
}
|
|
onlyIf = {
|
|
true
|
|
}
|
|
doFirst {
|
|
executionData = files(executionData.findAll {
|
|
it.exists()
|
|
})
|
|
}
|
|
afterEvaluate {
|
|
classDirectories = files(classDirectories.files.collect {
|
|
fileTree(dir: it,
|
|
exclude: [
|
|
'ws/bulkSms/impl/**',
|
|
'org/opencps/frontend/web/admin/**',
|
|
'org/opencps/jasper/message/**',
|
|
'org/opencps/api/digitalsignature/model/**'
|
|
])
|
|
})
|
|
}
|
|
}
|
|
|