-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
67 lines (55 loc) · 1.44 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
plugins {
id 'org.unbroken-dome.test-sets' version '2.2.1' apply false
id 'org.ajoberstar.grgit' version '4.0.2'
id "org.sonarqube" version "2.8"
}
def baseVersion = '0.1.0'
def commitHash = grgit.head().abbreviatedId
def buildNum = System.env.CIRCLE_BUILD_NUM ?: '0'
def fullVersion = "${baseVersion}.${buildNum}-${commitHash}"
subprojects {
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'org.unbroken-dome.test-sets'
version = fullVersion
sourceCompatibility = 11
targetCompatibility = 11
repositories {
jcenter()
}
jacocoTestReport {
reports {
xml.enabled true
}
}
}
task testReport(type: TestReport) {
destinationDir = file("$buildDir/reports/allTests")
// Include the results from the `test` task in all subprojects
reportOn subprojects*.test
}
task test {
finalizedBy testReport
}
task check {
finalizedBy testReport
}
task dumpVersion {
def versionFile = file("$buildDir/version.txt")
doLast {
versionFile.text = fullVersion
}
inputs.property 'fullVersion', fullVersion
outputs.file versionFile
}
task assemble {
dependsOn dumpVersion
}
sonarqube {
properties {
property "sonar.projectKey", "adnovum_gong-notifier"
property "sonar.organization", "adnovum"
property "sonar.host.url", "https://sonarcloud.io"
}
}
subprojects*.tasks*.jacocoTestReport.each { tasks.sonarqube.dependsOn it }