forked from MyKitchenManager/my-kitchen-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
47 lines (40 loc) · 1.48 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
buildscript {
dependencies {
classpath 'mysql:mysql-connector-java:8.0.18'
}
}
plugins {
id 'org.springframework.boot' version '2.2.4.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'java'
id "org.flywaydb.flyway" version "5.2.4"
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'mysql:mysql-connector-java:8.0.18'
implementation 'com.auth0:java-jwt:3.4.0'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
def dbHost = System.getenv("DB_HOST")!= null ? System.getenv("DB_HOST") : "127.0.0.1"
def dbUser = System.getenv("DB_USER")!= null ? System.getenv("DB_USER") : "root"
def dbPassword = System.getenv("DB_PASSWORD")!= null ? System.getenv("DB_PASSWORD") : "myKitchenManager"
def dbSchema = System.getenv("DB_SCHEMA")!= null ? System.getenv("DB_SCHEMA") : "my_kitchen_manager"
def tailCommand = System.getenv("ENV")!= null ? "${dbSchema}?reconnect=true" : ""
flyway {
url = "jdbc:mysql://${dbUser}:${dbPassword}@${dbHost}/${tailCommand}"
schemas = ["${dbSchema}"]
}
test {
useJUnitPlatform()
}