-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
99 lines (87 loc) · 2.45 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:2.2.2.RELEASE"
}
}
plugins {
id "org.flywaydb.flyway" version "6.0.8"
id "org.sonarqube" version "3.3"
id "com.moowork.node" version "1.2.0"
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
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')
}
}
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 integrationTest
}
assemble {
dependsOn ramlToHtml
dependsOn copyRamlHtmlToBuild
dependsOn copyConsulRegistrationToBuild
dependsOn jacocoTestReport
}
build {
dependsOn jacocoTestReport
dependsOn check
dependsOn ramlToHtml
dependsOn copyRamlHtmlToBuild
dependsOn copyConsulRegistrationToBuild
}