-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
104 lines (91 loc) · 2.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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:1.5.9.RELEASE"
}
}
plugins {
id "org.flywaydb.flyway" version "4.2.0"
id "com.moowork.node" version "1.2.0"
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'spring-boot'
apply plugin: 'jacoco'
apply plugin: 'checkstyle'
sourceSets {
integrationTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/integration-test/java')
}
resources.srcDir file('src/integration-test/resources')
}
main {
resources {
srcDirs "src/main/resources", "build/data"
}
}
}
apply from: "dependency.gradle"
apply from: "codeAnalysis.gradle"
apply from: "documentation.gradle"
apply from: "database.gradle"
apply from: "tests.gradle"
apply from: "registration.gradle"
group = serviceGroup
version = serviceVersion
archivesBaseName = rootProject.name
project.ext.buildTime = java.time.Instant.now().toString() // for versioning
sourceCompatibility = 1.8
targetCompatibility = 1.8
idea {
project {
vcs = 'Git'
ipr.withXml { xmlFile ->
// enable 'Annotation Processors', source: https://gist.github.com/stephanos/8645809
xmlFile.asNode().component
.find { it.@name == 'CompilerConfiguration' }['annotationProcessing'][0]
.replaceNode {
annotationProcessing {
profile(default: true, name: 'Default', useClasspath: 'true', enabled: true)
}
}
}
}
module {
sourceDirs -= file('src/integration-test/java')
testSourceDirs += file('src/integration-test/java')
}
}
processResources {
// we want the generated HTML spec file included in the output jar
finalizedBy ramlToHtml
// update version information in build
filesMatching('**/version.properties') {
expand(project.properties)
}
}
checkstyle {
toolVersion = "8.12"
}
check {
dependsOn checkApiIsRaml
dependsOn integrationTest
}
assemble {
dependsOn ramlToHtml
dependsOn copyRamlHtmlToBuild
dependsOn copyConsulRegistrationToBuild
dependsOn jacocoTestReport
}
build {
dependsOn jacocoTestReport
dependsOn check
dependsOn ramlToHtml
dependsOn copyRamlHtmlToBuild
dependsOn copyConsulRegistrationToBuild
}