-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
100 lines (84 loc) · 2.83 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "org.rodnansol:spring-configuration-property-documenter-gradle-plugin:${springConfigurationPropertyDocumenterVersion}"
}
}
plugins {
id "com.diffplug.spotless" version "${spotlessVersion}" apply false
id "com.github.spotbugs" version "${spotbugsVersion}" apply false
id "io.spring.dependency-management" version "${springDependencyManagementVersion}" apply false
id "org.springframework.boot" version "${springBootVersion}" apply false
id "org.graalvm.buildtools.native" version "${graalvmBuildToolsVersion}" apply false
}
allprojects {
apply plugin: "java"
apply plugin: "java-library"
repositories {
mavenCentral()
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
sourceSets {
optionalSupport
}
java {
registerFeature("optionalSupport") {
usingSourceSet(sourceSets.optionalSupport)
}
}
apply plugin: "io.spring.dependency-management"
dependencyManagement {
imports {
mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
}
}
dependencies {
compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")
testCompileOnly("org.projectlombok:lombok")
testAnnotationProcessor("org.projectlombok:lombok")
}
compileJava {
options.encoding = "UTF-8"
options.compilerArgs << "-parameters"
}
compileTestJava {
options.encoding = "UTF-8"
options.compilerArgs << "-parameters"
}
test {
systemProperties("spring.cloud.compatibility-verifier.enabled": "false")
useJUnitPlatform()
}
afterEvaluate {
tasks.findByName("bootRun")?.configure {
systemProperty("spring.cloud.compatibility-verifier.enabled", "false")
}
}
apply plugin: "com.diffplug.spotless"
spotless {
encoding "UTF-8"
java {
toggleOffOn()
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
palantirJavaFormat()
targetExclude("build/generated/**")
custom("Refuse wildcard imports", {
if (it =~ /\nimport .*\*;/) {
throw new IllegalStateException("Do not use wildcard imports, 'spotlessApply' cannot resolve this issue, please fix it manually.")
}
} as Closure<String>)
}
}
apply plugin: "com.github.spotbugs"
spotbugs {
spotbugsTest.enabled = false
omitVisitors.addAll("FindReturnRef", "DontReusePublicIdentifiers")
}
}
apply from: "${rootDir}/gradle/generate-configuration-properties-docs.gradle"