-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
145 lines (120 loc) · 4.17 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
143
plugins {
id 'org.springframework.boot' version '2.5.0'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'org.jetbrains.kotlin.jvm' version '1.5.10'
id 'org.jetbrains.kotlin.plugin.spring' version '1.5.10'
id 'org.jetbrains.kotlin.plugin.jpa' version '1.5.10'
id 'groovy'
id 'idea'
id 'org.asciidoctor.jvm.convert' version '3.3.0'
id 'info.solidsoft.pitest' version '1.5.1'
id 'io.swagger.core.v3.swagger-gradle-plugin' version '2.1.9'
}
group = 'de.jkrech'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
repositories {
mavenCentral()
}
sourceSets {
main.kotlin.srcDirs += 'src/main/kotlin'
test.groovy.srcDirs += 'src/test/groovy'
}
def axonVersion = '4.5.2'
def groovyVersion = '3.0.8'
def spockVersion = '2.0-groovy-3.0'
def spockReportsVersion = '2.0-groovy-3.0'
def archUnitVersion = '0.19.0'
def springFoxVersion = '3.0.0'
dependencies {
// spring
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
// implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
// kotlin
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin'
implementation 'org.jetbrains.kotlin:kotlin-reflect'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
// axon
implementation("org.axonframework:axon-spring-boot-starter:${axonVersion}") {
exclude group: 'org.axonframework', module: 'axon-server-connector'
}
// Springfox Swagger
implementation "io.springfox:springfox-swagger2:${springFoxVersion}"
implementation "io.springfox:springfox-swagger-ui:${springFoxVersion}"
// test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
// axon test
testImplementation "org.axonframework:axon-test:${axonVersion}"
// groovy, spock
testImplementation "org.codehaus.groovy:groovy-all:${groovyVersion}"
testImplementation "org.spockframework:spock-core:${spockVersion}"
testImplementation "org.spockframework:spock-spring:${spockVersion}"
testImplementation("com.athaydes:spock-reports:${spockReportsVersion}") {
transitive = false // this avoids affecting your version of Groovy/Spock
}
// quality
testImplementation "com.tngtech.archunit:archunit:${archUnitVersion}"
testImplementation "com.tngtech.archunit:archunit-junit5:${archUnitVersion}"
testRuntimeOnly "com.tngtech.archunit:archunit-junit5-engine:${archUnitVersion}"
// persistence
runtimeOnly 'com.h2database:h2'
}
compileKotlin {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
kotlinOptions {
freeCompilerArgs = ['-Xjsr305=strict']
jvmTarget = JavaVersion.VERSION_11
}
}
asciidoctor {
dependsOn 'build'
baseDirFollowsSourceFile()
sourceDir file('src/docs/asciidoc')
//backends = ['html5', 'pdf']
sources {
include 'mediamanager.adoc'
}
outputDir file("build/docs")
}
test {
useJUnitPlatform()
}
pitest {
// Bei Auskommentierung des testPlugins wird junit4 verwendet
testPlugin = 'junit5'
pitestVersion = '1.5.1' //for Java 11 compatibility with gradle-pitest-plugin 1.3.0
//adds dependency to org.pitest:pitest-junit5-plugin and sets "testPlugin" to "junit5"
junit5PluginVersion = '0.12'
targetClasses = ['de.jkrech.mediamanager.*']
avoidCallsTo = ['kotlin.jvm.internal']
threads = 4
outputFormats = ['XML', 'HTML']
timestampedReports = false
mutators = ['STRONGER'] // groups: OLD_DEFAULTS, DEFAULTS, STRONGER, ALL
}
// openapi
resolve {
outputFileName = 'MediaManagerAPI'
outputFormat = 'JSON'
prettyPrint = 'TRUE'
classpath = sourceSets.main.runtimeClasspath
resourcePackages = ['de.jkrech.mediamanager']
outputDir = file('build/openapi')
}
// test without architecture tests
tasks.withType(Test) { Test task ->
task.useJUnitPlatform {
excludeTags 'architecture'
}
}
// architecture test as separate task
task architectureTest(type: Test) { Test task ->
task.useJUnitPlatform { JUnitPlatformOptions options ->
options.includeTags 'architecture'
}
task.mustRunAfter tasks.test
}