-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
90 lines (74 loc) · 1.98 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
plugins {
id 'org.sonarqube' version '3.5.0.2730'
id 'jacoco'
}
apply from: 'https://raw.githubusercontent.com/gocd/gocd-plugin-gradle-task-helpers/75a8575/helper.gradle'
def baseGroup = 'com.adnovum.tenantsecrets'
def baseVersion = '0.0.7'
allprojects {
repositories {
mavenCentral()
}
}
subprojects {
apply plugin: 'jacoco'
group = baseGroup
version = baseVersion
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
jacoco {
toolVersion = '0.8.6'
}
tasks.withType(JacocoReport).configureEach { enabled = false }
tasks.withType(Test).configureEach { finalizedBy ':jacocoMergedReport' }
}
gocdPlugin {
id = "${baseGroup}.plugin"
pluginVersion = baseVersion
goCdVersion = '20.7.0'
name = 'Tenant secrets plugin'
description = 'Generates AES secrets that are bound to a specific tenant.'
vendorName = 'adnovum'
vendorUrl = 'https://github.com/adnovum/tenantsecrets'
pluginProject = project(':plugin')
}
tasks.register('jacocoMergedReport', JacocoReport) {
subprojects {
sourceSets sourceSets.main
executionData files(tasks.withType(Test)).filter { it.name.endsWith('.exec') && it.exists() }
dependsOn tasks.withType(Test)
}
reports {
xml.required = true
html.required = true
}
}
sonarqube {
properties {
property 'sonar.projectKey', 'adnovum_tenantsecrets'
property 'sonar.organization', 'adnovum'
property 'sonar.host.url', 'https://sonarcloud.io'
property 'sonar.coverage.jacoco.xmlReportPaths', "${(jacocoMergedReport as JacocoReport).reports.xml.outputLocation.get()}"
}
}
subprojects {
sonarqube {
properties {
property 'sonar.coverage.jacoco.xmlReportPaths', null
}
}
}
task tagRelease(type: Exec) {
commandLine 'git', 'tag', "v${baseVersion}"
}
task pushTag(type: Exec) {
commandLine 'git', 'push', 'origin', "v${baseVersion}"
mustRunAfter tagRelease
}
task release {
group 'Publishing'
description 'Trigger release via GH Actions'
dependsOn tagRelease, pushTag
}