-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathbuild.gradle
119 lines (96 loc) · 2.63 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
group 'io.fency'
import com.github.spotbugs.SpotBugsTask
apply from: "${rootDir}/libraries.gradle"
buildscript {
ext {
spotbugsVersion = '2.0.1'
releasePluginVersion = '1.10.0'
}
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
maven(){
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
dependencies {
classpath "com.github.spotbugs:spotbugs-gradle-plugin:${spotbugsVersion}"
classpath "pl.allegro.tech.build:axion-release-plugin:${releasePluginVersion}"
}
}
apply plugin: 'pl.allegro.tech.build.axion-release'
allprojects {
project.version = scmVersion.version
}
subprojects {
repositories {
mavenCentral()
maven(){
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'jacoco'
apply plugin: 'com.github.spotbugs'
apply plugin: 'signing'
apply plugin: 'maven-publish'
apply from: "${rootDir}/publishing.gradle"
def platform = project.dependencies.platform("org.springframework.boot:spring-boot-dependencies:2.2.1.RELEASE")
project.dependencies.add("implementation", platform)
project.dependencies.add("annotationProcessor", platform)
tasks.withType(JavaCompile) {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
options.deprecation = true
options.encoding = 'UTF-8'
}
spotbugs {
sourceSets = [sourceSets.main]
ignoreFailures = false
reportsDir = file("${buildDir}/reports/findbugsReports")
effort = "max"
reportLevel = "high"
}
tasks.withType(SpotBugsTask) {
reports {
html.enabled = true
xml.enabled = false
}
}
jacoco {
}
jacocoTestReport {
executionData fileTree(project.rootDir.absolutePath).include("${buildDir}/jacoco/*.exec")
reports {
xml.enabled = true
csv.enabled = false
html.destination file("${buildDir}/reports/jacoco/coverage.html")
xml.destination file("${buildDir}/reports/jacoco/coverage.xml")
}
afterEvaluate {
classDirectories.from = files(classDirectories.files.collect {
fileTree(dir: it, excludes: ['**/*Configuration*'])
})
}
dependsOn test
}
check.dependsOn jacocoTestReport
test {
useJUnitPlatform()
}
task integrationTest(type: Test, dependsOn: test) {
beforeSuite {descriptor ->
if (descriptor.className != null) {
logger.lifecycle("Running: " + descriptor.className)
}
}
include '**/**/*ItTest'
reports {
html.destination = file("$buildDir/reports/integrationTests")
}
}
check.dependsOn integrationTest
}