-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
132 lines (110 loc) · 4.43 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
plugins {
id 'java'
id 'org.springframework.boot' version '3.4.1'
id 'io.spring.dependency-management' version '1.1.7'
id 'com.diffplug.spotless' version '6.25.0'
}
apply plugin: 'io.spring.dependency-management'
group = 'ru.dankoy'
version = '0.3.4-SNAPSHOT'
java {
sourceCompatibility = '21'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
ext {
springShellVersion = '3.4.0'
resilience4jBomVersion = '2.2.0'
}
dependencyManagement {
imports {
mavenBom "org.springframework.shell:spring-shell-dependencies:${springShellVersion}"
mavenBom "io.github.resilience4j:resilience4j-bom:${resilience4jBomVersion}"
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-freemarker'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
// implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
implementation 'org.springframework.shell:spring-shell-starter'
implementation 'ch.qos.logback:logback-classic'
implementation 'ch.qos.logback:logback-core'
// sqlite with default version from spring boot bom (3.43.2.0) doesn't work with spring boot 3.2.2
// sqlite version 3.42.1 works with spring boot 3.1.3
// Working sqlite version with spring boot 3.2.2 is 3.45.1.0
implementation 'org.xerial:sqlite-jdbc:3.47.1.0'
implementation 'com.fasterxml.jackson.core:jackson-databind'
// okhttp is not a part of spring dependencies BOM. Migrating to WebClient
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
testImplementation 'com.squareup.okhttp3:mockwebserver:4.12.0'
implementation 'org.springframework.boot:spring-boot-starter-cache'
implementation 'com.github.ben-manes.caffeine:caffeine'
// starting from spring boot 3.4.0 flyway (10.20.1) behavior is ridiculous
// it applied migrations from tests on production environment
// so I decided to use latest version from maven
// 11.1.0, 11.0.1, 10.22.0 works perfect
// For some reason the problem is in vscode spring boot plugin.
// If you run app from there, you get this problem with other versions of flyway.
// If you run app from console - everything is fine as should be.
implementation 'org.flywaydb:flyway-core'
// implementation 'org.jooq:jooq'
// freemarker
implementation 'org.freemarker:freemarker'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.liquibase:liquibase-core'
// spotless
implementation 'com.diffplug.spotless:spotless-lib:2.45.0'
// resilence4j
implementation 'io.github.resilience4j:resilience4j-spring-boot3'
// implementation 'io.github.resilience4j:resilience4j-ratelimiter'
//implementation 'io.github.resilience4j:resilience4j-reactor'
implementation 'org.springframework.boot:spring-boot-starter-aop' // necessary for annotations
//implementation 'org.springframework.boot:spring-boot-starter-actuator'
}
test {
useJUnitPlatform()
testLogging.showStandardStreams = true
afterTest { desc, result ->
logger.quiet "Executing test ${desc.name} [${desc.className}] with result: ${result.resultType}"
}
}
spotless {
sql {
target 'src/main/resources/**/*.sql' // have to set manually
target 'src/test/resources/**/*.sql' // have to set manually
dbeaver() // has its own section below
// prettier(['prettier': '3.0.3', 'prettier-plugin-sql': '0.18.0'])
// has its own section below
}
java {
target fileTree('.') {
include '**/*.java'
exclude '**/build/**', '**/build-*/**'
}
toggleOffOn()
googleJavaFormat('1.25.1')
.reflowLongStrings()
.formatJavadoc(true)
.reorderImports(false)
.groupArtifact('com.google.googlejavaformat:google-java-format')
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
}
yaml {
target '.github/**/*.yaml', '.github/**/*.yml'
jackson()
prettier()
}
}