-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
85 lines (68 loc) · 2.34 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
plugins {
id 'java'
id 'org.flywaydb.flyway' version '6.5.5'
id 'org.springframework.boot' version '2.4.4'
id 'com.google.cloud.tools.jib' version '2.8.0'
id 'com.avast.gradle.docker-compose' version '0.13.4'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
}
group = 'com.mw.portfolio'
version = '1.0.0'
sourceCompatibility = '11'
configurations { compileOnly { extendsFrom annotationProcessor } }
repositories { mavenCentral() }
dependencies {
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'org.postgresql:postgresql'
annotationProcessor 'org.projectlombok:lombok'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
// boot
implementation 'org.flywaydb:flyway-core'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-cache'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
// cloud
implementation 'com.google.cloud:spring-cloud-gcp-starter-secretmanager'
// other
implementation 'commons-io:commons-io:2.5'
implementation 'com.sendgrid:sendgrid-java:4.0.1'
implementation 'com.google.firebase:firebase-admin:7.1.1'
implementation 'com.vladmihalcea:hibernate-types-52:2.9.13'
// test
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
dependencyManagement {
imports {
mavenBom "com.google.cloud:spring-cloud-gcp-dependencies:2.0.2"
}
}
flyway {
user = 'admin'
password = 'admin'
url = 'jdbc:postgresql://localhost:5432/portfolio'
}
jib {
container {
ports = ['8080']
}
to {
image = 'gcr.io/warrenburg-portfolio/portfolio-server:latest'
}
from {
image = 'gcr.io/distroless/java:11'
}
}
dockerCompose {
removeOrphans = true
removeVolumes = false
projectName = 'portfolio-server'
dockerComposeWorkingDirectory = "$rootDir/docker"
}
task runPostgres(type: Exec) {
workingDir rootDir
commandLine 'docker-compose', 'run', '-d', '--service-ports', 'portfolio-db'
}
test { useJUnitPlatform() }