-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
66 lines (52 loc) · 2.11 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
plugins {
id "java"
id "org.springframework.boot" version "1.5.4.RELEASE"
id "org.flywaydb.flyway" version "5.1.4"
}
repositories {
mavenCentral()
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.boot:spring-boot-starter-jdbc")
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("org.springframework.boot:spring-boot-starter-security")
compile("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.1")
// https://mvnrepository.com/artifact/mysql/mysql-connector-java
compile group: 'mysql', name: 'mysql-connector-java', version: '8.0.12'
// To use Spring Cloud Connectors for development
compile 'org.springframework.cloud:spring-cloud-localconfig-connector'
// If you intend to deploy the app to Cloud Foundry
compile 'org.springframework.cloud:spring-cloud-cloudfoundry-connector'
compile 'org.springframework.cloud:spring-cloud-spring-service-connector'
compile "org.springframework.boot:spring-boot-configuration-processor"
testCompile("org.springframework.boot:spring-boot-starter-test")
}
def developmentDbUrl = "jdbc:mysql://localhost:3306/tracker_dev?user=tracker&useSSL=false&useTimezone=true&serverTimezone=UTC&useLegacyDatetimeCode=false"
bootRun.environment([
"HTTPS_DISABLED": true,
"MANAGEMENT_SECURITY_ENABLED": false,
"SPRING_DATASOURCE_URL": developmentDbUrl,
"WELCOME_MESSAGE": "hello",
])
def testDbUrl = "jdbc:mysql://localhost:3306/tracker_test?user=tracker&useSSL=false&useTimezone=true&serverTimezone=UTC&useLegacyDatetimeCode=false"
test.environment([
"HTTPS_DISABLED": true,
"MANAGEMENT_SECURITY_ENABLED": false,
"SPRING_DATASOURCE_URL": testDbUrl,
"WELCOME_MESSAGE": "Hello from test",
])
flyway {
url = developmentDbUrl
user = "tracker"
password = ""
locations = ["filesystem:databases/tracker/migrations"]
}
task testMigrate(type: org.flywaydb.gradle.task.FlywayMigrateTask) {
url = testDbUrl
}
springBoot {
buildInfo()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8