-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
118 lines (97 loc) · 3.51 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
import org.springframework.boot.gradle.plugin.SpringBootPlugin
plugins {
id 'org.springframework.boot' version '2.2.1.RELEASE' apply false
id 'org.ec4j.editorconfig' version '0.0.3'
}
subprojects {
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'jacoco'
version = '0.2-SNAPSHOT'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
maven {
url 'https://repo.gradle.org/gradle/libs-releases'
}
}
dependencyManagement {
imports {
mavenBom SpringBootPlugin.BOM_COORDINATES
}
}
dependencies {
// Spring Boot starter
implementation('org.springframework.boot:spring-boot-starter')
implementation('org.springframework.boot:spring-boot-starter-web')
// Spring logging
implementation('org.springframework.boot:spring-boot-starter-logging')
// JavaPoet
implementation('com.squareup:javapoet:1.11.1')
// Lombok
// compileOnly('org.projectlombok:lombok')
// annotationProcessor('org.projectlombok:lombok')
// Gradle tooling API
implementation group: 'org.gradle', name: 'gradle-tooling-api', version: '5.0'
testImplementation group: 'org.gradle', name: 'gradle-tooling-api', version: '5.0'
// Gradle sources (will be removed)
runtimeOnly group: 'org.gradle', name: 'gradle-core', version: '5.0'
runtimeOnly group: 'org.gradle', name: 'gradle-wrapper', version: '5.0'
// Testing
//
// Spring testing
testImplementation('org.springframework.boot:spring-boot-starter-test')
// Spock
testImplementation('org.spockframework:spock-core:1.3-groovy-2.5')
testImplementation('org.spockframework:spock-spring:1.3-groovy-2.5')
// Development tools
annotationProcessor('org.springframework.boot:spring-boot-configuration-processor')
compile('org.springframework.boot:spring-boot-devtools')
}
sourceSets {
// integration tests
integrationTest {
groovy.srcDir file('src/integration-test/groovy')
resources.srcDir file('src/integration-test/resources')
// compileClasspath += main.output + test.output
// runtimeClasspath += main.output + test.output
compileClasspath += sourceSets.main.output + configurations.testRuntimeClasspath
runtimeClasspath += output + compileClasspath
}
}
configurations {
// IT
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}
task integrationTest(type: Test) {
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
mustRunAfter test
}
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:all"
}
jacocoTestReport {
getExecutionData().setFrom(fileTree(dir: 'build/jacoco', include: '**/*.exec'))
reports {
xml.enabled = true
html.enabled = true
}
}
editorconfig {
excludes = ['**/gradlew.bat', '**/out/']
}
check.dependsOn integrationTest
check.dependsOn jacocoTestReport
check.dependsOn editorconfigCheck
install.dependsOn build
}
wrapper {
gradleVersion = '5.6.4'
distributionType = Wrapper.DistributionType.ALL
}