-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
106 lines (83 loc) · 2.58 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
plugins {
id 'org.springframework.boot' version '2.3.4.RELEASE'
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
id 'java'
id 'jacoco'
id 'info.solidsoft.pitest' version '1.5.1'
id 'org.asciidoctor.jvm.convert' version '3.2.0'
id "org.sonarqube" version "3.2.0"
}
group = 'com.github.benjamineckstein'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
sonarqube {
properties {
property "sonar.projectKey", "benjamineckstein_showcase"
property "sonar.organization", "benjamineckstein"
property "sonar.host.url", "https://sonarcloud.io"
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
compileOnly "org.springframework.boot:spring-boot-devtools"
runtimeOnly 'com.h2database:h2'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'com.tngtech.archunit:archunit:0.14.1'
testImplementation 'com.openpojo:openpojo:0.8.13'
testImplementation 'nl.jqno.equalsverifier:equalsverifier:3.4.3'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
testImplementation 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
ext {
set('snippetsDir', file('build/generated-snippets'))
}
asciidoctor {
setAttributes(['snippets': file('build/generated-snippets')])
outputDir file('build/docs')
}
test {
useJUnitPlatform()
outputs.dir snippetsDir
finalizedBy jacocoTestReport // report is always generated after tests run
finalizedBy asciidoctor
jacoco {
enabled = project.hasProperty("isCI")
}
}
jacocoTestReport {
reports {
xml.enabled true
}
}
jacocoTestReport {
dependsOn test // tests are required to run before generating the report
}
pitest {
// testSourceSets = [sourceSets.test]
// mainSourceSets = [sourceSets.main]
// jvmArgs = ['-Xmx1024m']
testPlugin = "junit5"
junit5PluginVersion = '0.12'
excludedTestClasses = ["com.github.benjamineckstein.showcase.pojo.**", "com.github.benjamineckstein.showcase.ShowcaseApplicationTest"]
// mutators = ["ALL"]
}
if (hasProperty('buildScan')) {
gradleEnterprise {
buildScan {
termsOfServiceUrl = 'https://gradle.com/terms-of-service'
termsOfServiceAgree = 'yes'
}
}
}
build.dependsOn asciidoctor