forked from mbouchenoire/lowfer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
235 lines (203 loc) · 7.88 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
import org.gradle.internal.os.OperatingSystem
buildscript {
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
maven { url "https://repo.spring.io/plugins-release" }
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${spring_boot_version}"
classpath "io.spring.gradle:propdeps-plugin:0.0.10.RELEASE"
}
}
plugins {
id "java"
id "maven"
id "idea"
id "jacoco"
id "com.google.cloud.tools.jib" version "1.3.0"
id "com.gorylenko.gradle-git-properties" version "2.0.0"
id "com.github.node-gradle.node" version "1.3.0"
id "net.ltgt.apt-eclipse" version "0.21"
id "net.ltgt.apt-idea" version "0.21"
id "net.ltgt.apt" version "0.21"
id "org.sonarqube" version "2.7.1"
//jhipster-needle-gradle-plugins - JHipster will add additional gradle plugins here
}
sourceCompatibility=11
targetCompatibility=11
assert System.properties["java.specification.version"] == "11" || "12"
apply plugin: "org.springframework.boot"
apply plugin: "propdeps"
apply from: "gradle/docker.gradle"
apply from: "gradle/sonar.gradle"
//jhipster-needle-gradle-apply-from - JHipster will add additional gradle scripts to be applied here
if (project.hasProperty("dev")) {
apply from: "gradle/profile_dev.gradle"
} else {
apply from: "gradle/profile_prod.gradle"
}
if (project.hasProperty("war")) {
apply from: "gradle/war.gradle"
}
idea {
module {
excludeDirs += files("node_modules")
}
}
eclipse {
sourceSets {
main {
java {
srcDirs += ["build/generated/sources/annotationProcessor/java/main"]
}
}
}
}
// See https://virgo47.wordpress.com/2018/09/14/classpath-too-long-with-spring-boot-and-gradle/ for details
// https://github.com/jhipster/generator-jhipster/issues/9713
if (OperatingSystem.current().isWindows()) {
task classpathJar(type: Jar) {
inputs.files sourceSets.main.runtimeClasspath
archiveName = "runboot-classpath.jar"
doFirst {
manifest {
def classpath = sourceSets.test.runtimeClasspath.files
attributes "Class-Path": classpath.collect {f -> f.toURI().toString()}.join(" ")
}
}
}
bootRun {
classpath = classpathJar.outputs.files
}
}
defaultTasks "bootRun"
group = "org.lowfer"
version = "0.1.0-snapshot"
description = ""
springBoot {
mainClassName = "org.lowfer.Lowfer"
}
test {
useJUnitPlatform()
exclude "**/*IT*", "**/*IntTest*"
testLogging {
events 'FAILED', 'SKIPPED'
}
// uncomment if the tests reports are not generated
// see https://github.com/jhipster/generator-jhipster/pull/2771 and https://github.com/jhipster/generator-jhipster/pull/4484
// ignoreFailures true
reports.html.enabled = false
}
task integrationTest(type: Test) {
useJUnitPlatform()
description = "Execute integration tests."
group = "verification"
include "**/*IT*", "**/*IntTest*"
testLogging {
events 'FAILED', 'SKIPPED'
}
// uncomment if the tests reports are not generated
// see https://github.com/jhipster/generator-jhipster/pull/2771 and https://github.com/jhipster/generator-jhipster/pull/4484
// ignoreFailures true
reports.html.enabled = false
}
check.dependsOn integrationTest
task testReport(type: TestReport) {
destinationDir = file("$buildDir/reports/tests")
reportOn test
}
task integrationTestReport(type: TestReport) {
destinationDir = file("$buildDir/reports/tests")
reportOn integrationTest
}
configurations {
providedRuntime
implementation.exclude module: "spring-boot-starter-tomcat"
}
repositories {
mavenLocal()
mavenCentral()
jcenter()
// TODO To remove after final JHipster release
maven { url "http://oss.sonatype.org/content/repositories/snapshots" }
//jhipster-needle-gradle-repositories - JHipster will add additional repositories
}
dependencies {
// import JHipster dependencies BOM
implementation platform("io.github.jhipster:jhipster-dependencies:${jhipster_dependencies_version}" )
// Use ", version: jhipster_dependencies_version, changing: true" if you want
// to use a SNAPSHOT release instead of a stable release
implementation group: "io.github.jhipster", name: "jhipster-framework"
implementation "io.dropwizard.metrics:metrics-core"
implementation "io.micrometer:micrometer-registry-prometheus"
implementation "net.logstash.logback:logstash-logback-encoder"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-hppc"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310"
implementation "com.fasterxml.jackson.core:jackson-annotations"
implementation "com.fasterxml.jackson.core:jackson-databind"
implementation "com.fasterxml.jackson.module:jackson-module-afterburner"
implementation "commons-io:commons-io"
implementation "org.apache.commons:commons-lang3"
implementation "org.eclipse.jgit:org.eclipse.jgit:5.8.1.202007141445-r"
implementation "org.eclipse.jgit:org.eclipse.jgit.ssh.jsch:5.8.1.202007141445-r"
implementation "org.springframework.boot:spring-boot-loader-tools"
implementation "org.springframework.boot:spring-boot-starter-logging"
implementation "org.springframework.boot:spring-boot-starter-actuator"
implementation "org.springframework.boot:spring-boot-starter-aop"
implementation "org.springframework.boot:spring-boot-starter-security"
implementation ("org.springframework.boot:spring-boot-starter-web") {
exclude module: "spring-boot-starter-tomcat"
}
implementation "org.springframework.boot:spring-boot-starter-undertow"
implementation "org.zalando:problem-spring-web"
implementation "org.springframework.boot:spring-boot-starter-cloud-connectors"
implementation "org.springframework.security:spring-security-config"
implementation "org.springframework.security:spring-security-data"
implementation "org.springframework.security:spring-security-web"
implementation "io.jsonwebtoken:jjwt-api"
runtimeOnly "io.jsonwebtoken:jjwt-impl"
runtimeOnly "io.jsonwebtoken:jjwt-jackson"
implementation ("io.springfox:springfox-swagger2") {
exclude module: "mapstruct"
}
implementation "io.springfox:springfox-bean-validators"
implementation 'com.eclipsesource.j2v8:j2v8_linux_x86_64:4.6.0'
implementation 'guru.nidi:graphviz-java-all-j2v8:0.16.1'
implementation 'guru.nidi:graphviz-rough:0.16.1'
implementation group: 'org.yaml', name: 'snakeyaml', version: '1.26'
implementation group: 'io.vavr', name: 'vavr', version: '0.10.2'
annotationProcessor ("org.springframework.boot:spring-boot-configuration-processor:${spring_boot_version}") {
exclude group: "com.vaadin.external.google", module: "android-json"
}
testImplementation "com.jayway.jsonpath:json-path"
testImplementation ("org.springframework.boot:spring-boot-starter-test") {
exclude module: "junit"
exclude group: "com.vaadin.external.google", module: "android-json"
}
testImplementation "org.springframework.security:spring-security-test"
testImplementation "org.springframework.boot:spring-boot-test"
testImplementation "org.junit.jupiter:junit-jupiter-engine"
testImplementation "org.junit.vintage:junit-vintage-engine"
testImplementation "org.assertj:assertj-core"
testImplementation "junit:junit"
testImplementation "org.mockito:mockito-core"
testImplementation "org.hamcrest:hamcrest-library"
}
task cleanResources(type: Delete) {
delete "build/resources"
}
wrapper {
gradleVersion = "5.4.1"
}
if (project.hasProperty("nodeInstall")) {
node {
version = "${node_version}"
npmVersion = "${npm_version}"
yarnVersion = "${yarn_version}"
download = true
}
}
compileJava.dependsOn processResources
processResources.dependsOn bootBuildInfo