-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
54 lines (46 loc) · 1.4 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
// custom configuration and dependencies are moved to buildSrc
// dependabot probably wont work with such configuration
plugins {
id 'spotless-conventions'
}
ext {
set("PROJECT_VERSION", "1.5.0")
}
// doesn't work in build.gradle in buildSrc project
ext {
springCloudDependencies = "org.springframework.cloud:spring-cloud-dependencies:2024.0.0"
}
//share project version between all projects
allprojects {
version = "${PROJECT_VERSION}-SNAPSHOT"
}
tasks.register('printVersion') {
// any code that goes here is part of configuring the task
// this code will always get run, even if the task is not executed
doLast { // add a task action
// any code that goes here is part of executing the task
// this code will only get run if and when the task gets executed
println project.version
}
}
spotless {
java {
target fileTree('.') {
include '**/*.java'
exclude '**/build/**', '**/build-*/**'
}
toggleOffOn()
googleJavaFormat('1.24.0')
.reflowLongStrings()
.formatJavadoc(true)
.reorderImports(false)
.groupArtifact('com.google.googlejavaformat:google-java-format')
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
}
json {
target 'monitoring/**/*.json', '**/*.json'
jackson()
}
}