forked from telekom/testerra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
142 lines (113 loc) · 3.62 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
plugins {
id "io.codearte.nexus-staging" version "0.30.0"
id 'com.github.jk1.dependency-license-report' version '1.16'
}
// Plugin dependency-license-report
import com.github.jk1.license.filter.*
import com.github.jk1.license.render.*
def jacocoVersion = "0.8.6"
apply plugin: 'io.codearte.nexus-staging'
ext {
/*
module stuff
*/
core_interop = project(':core-interop')
driver_ui = project(':driver-ui')
driver_ui_desktop = project(':driver-ui-desktop')
image_processing = project(':image-processing')
core = project(':core')
report = project(':report-ng')
seleniumVersion = '3.141.59'
guavaVersion = "28.1-jre"
moduleVersion = '1-SNAPSHOT'
if (System.properties.containsKey('ttVersion')) {
moduleVersion = System.getProperty('ttVersion')
}
}
allprojects {
apply plugin: 'java-library'
apply plugin: 'project-report'
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = "UTF-8"
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
subprojects {
group 'io.testerra'
version moduleVersion
archivesBaseName = "testerra"
apply plugin: 'maven-publish' // tasks publish and publishToMavenLocal
apply plugin: 'jacoco'
apply plugin: 'signing'
apply plugin: 'com.github.jk1.dependency-license-report'
// important!
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
jacoco {
toolVersion = jacocoVersion
}
test {
ignoreFailures = true
useTestNG()
testLogging {
outputs.upToDateWhen { false }
showStandardStreams = true
}
options {
systemProperties(System.getProperties())
}
jacoco {
enabled = System.properties.containsKey("withJacoco")
//excludes = ['jdk.internal.*']
}
}
task cleanDist {
doLast {
delete "out"
}
}
tasks.whenTaskAdded { t ->
if (t.name.startsWith("publish")) {
boolean e = t.project.publish.enabled
if (!e) {
println "Not running publish for " + t.project.name
t.enabled = false
}
}
}
clean.dependsOn(cleanDist)
// Plugin dependency-license-report
licenseReport {
filters = [new ExcludeTransitiveDependenciesFilter()]
configurations = ['runtimeClasspath', 'testRuntimeClasspath']
// renderers = [new CsvReportRenderer("${project.name}.csv"), new InventoryMarkdownReportRenderer("${project.name}.md"), new TextReportRenderer("${project.name.toUpperCase()}.txt") ]
renderers = [new InventoryMarkdownReportRenderer("${project.name}.md")]
outputDir = "$rootDir/license3rdparty"
}
}
// Do not move this integration because `group` and `version` is needed for publishing
apply from: rootProject.file('publish.gradle')
task jacocoAggregateReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
additionalSourceDirs(files(subprojects.sourceSets.main.allSource.srcDirs))
def srcdirs = files(subprojects.sourceSets.main.allSource.srcDirs)
def classdirs = files(subprojects.sourceSets.main.output)
sourceDirectories.setFrom(srcdirs)
classDirectories.setFrom(classdirs)
executionData(project.fileTree(dir: '.', include: '**/build/jacoco/test.exec'))
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
onlyIf = {
true
}
doFirst {
executionData(files(executionData.findAll {
it.exists()
}))
}
}