-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
136 lines (116 loc) · 4.16 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
buildscript {
dependencies {
classpath "com.google.cloud.tools:jib-spring-boot-extension-gradle:0.1.0"
}
}
plugins {
id "java"
id "groovy"
id "idea"
id "org.springframework.boot" version "${springBootVersion}"
id "com.google.cloud.tools.jib" version "3.4.4"
id "com.diffplug.spotless" version "${spotlessVersion}"
}
apply plugin: "io.spring.dependency-management"
repositories {
mavenCentral()
mavenLocal()
maven { url "https://repo.spring.io/release" }
}
spotless {
java {
googleJavaFormat()
trimTrailingWhitespace()
endWithNewline()
}
groovy {
trimTrailingWhitespace()
indentWithSpaces(4)
endWithNewline()
}
groovyGradle {
target "*.gradle", "**/*.gradle"
trimTrailingWhitespace()
indentWithSpaces(4)
endWithNewline()
}
format "misc", {
target "**/*.md", "**/*.yml"
trimTrailingWhitespace()
indentWithSpaces(2)
endWithNewline()
}
lineEndings "UNIX"
}
sourceCompatibility = "21"
[compileJava, compileTestJava, compileGroovy, compileTestGroovy]*.options*.encoding = "UTF-8"
[compileJava, compileTestJava, compileGroovy, compileTestGroovy]*.options*.compilerArgs = ["-Adoma.metamodel.enabled=true", "-parameters", "-Xlint:all"]
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
dependencies {
compileOnly "org.projectlombok:lombok"
annotationProcessor "org.projectlombok:lombok"
testCompileOnly "org.projectlombok:lombok"
testAnnotationProcessor "org.projectlombok:lombok"
implementation "org.springframework.boot:spring-boot-starter-validation"
implementation "org.springframework.boot:spring-boot-starter-thymeleaf"
implementation "org.springframework.boot:spring-boot-starter-mail"
implementation "org.springframework.boot:spring-boot-starter-data-jpa"
implementation "org.springframework.cloud:spring-cloud-starter-task"
implementation "org.springframework.cloud:spring-cloud-task-batch"
implementation "org.springframework.boot:spring-boot-starter-batch"
implementation "org.springframework.integration:spring-integration-core"
implementation "org.springframework.integration:spring-integration-jdbc"
developmentOnly "org.springframework.boot:spring-boot-docker-compose"
implementation "org.flywaydb:flyway-core"
implementation "org.flywaydb:flyway-mysql"
runtimeOnly "com.mysql:mysql-connector-j"
// runtimeOnly "org.postgresql:postgresql"
testImplementation "org.springframework.batch:spring-batch-test"
testImplementation "org.springframework.cloud:spring-cloud-test-support"
testImplementation "org.springframework.boot:spring-boot-starter-test"
testImplementation "com.h2database:h2"
testImplementation "org.flywaydb.flyway-test-extensions:flyway-spring-test:7.0.0"
testImplementation "org.springframework.boot:spring-boot-testcontainers"
testImplementation "org.testcontainers:junit-jupiter"
testImplementation "org.testcontainers:mysql"
testImplementation "org.assertj:assertj-core"
testImplementation "org.mockito:mockito-core"
runtimeOnly "org.springframework.boot:spring-boot-properties-migrator"
}
jib {
pluginExtensions {
pluginExtension {
implementation = "com.google.cloud.tools.jib.gradle.extension.springboot.JibSpringBootExtension"
}
}
from {
image = "public.ecr.aws/amazoncorretto/amazoncorretto:21"
}
container {
jvmFlags = [
"-Djava.awt.headless=true",
"-Djava.security.egd=file:/dev/./urandom",
"-Dfile.encoding=UTF-8",
"-Duser.language=ja",
"-Duser.country=JP",
"-Duser.timezone=Asia/Tokyo",
"-XX:MaxRAMPercentage=90"
]
}
}
tasks.named("test") {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
exceptionFormat = "full"
showCauses = true
showExceptions = true
showStackTraces = true
}
systemProperty "spring.profiles.active", "test"
}
compileJava.dependsOn "spotlessApply"