-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
102 lines (92 loc) · 5.18 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
// -*- coding: utf-8; mode: groovy -*-
import groovy.json.JsonSlurper
plugins {
id 'org.springframework.boot' version '2.3.0.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'java'
id "org.flywaydb.flyway" version "6.4.3"
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
// https://mvnrepository.com/artifact/org.hibernate/hibernate-gradle-plugin
compile group: 'org.hibernate', name: 'hibernate-gradle-plugin', version: '5.4.17.Final'
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web
compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.3.0.RELEASE'
// https://mvnrepository.com/artifact/org.hibernate/hibernate-validator
compile group: 'org.hibernate', name: 'hibernate-validator', version: '6.0.13.Final'
// https://mvnrepository.com/artifact/com.fasterxml.uuid/java-uuid-generator
compile group: 'com.fasterxml.uuid', name: 'java-uuid-generator', version: '3.1.0'
// https://mvnrepository.com/artifact/org.hibernate/hibernate-java8
compile group: 'org.hibernate', name: 'hibernate-java8', version: '5.1.0.Final'
// https://mvnrepository.com/artifact/org.springframework/spring-context
compile group: 'org.springframework', name: 'spring-context', version: '5.2.6.RELEASE'
// https://mvnrepository.com/artifact/junit/junit
testCompile group: 'junit', name: 'junit', version: '4.12'
// https://mvnrepository.com/artifact/org.hamcrest/hamcrest-all
testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-parent
compile group: 'org.springframework.boot', name: 'spring-boot-starter-parent', version: '2.1.12.RELEASE', ext: 'pom'
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: '2.3.0.RELEASE'
// https://mvnrepository.com/artifact/org.springframework/spring-orm
compile group: 'org.springframework', name: 'spring-orm', version: '5.2.6.RELEASE'
// https://mvnrepository.com/artifact/org.testinfected.hamcrest-matchers/core-matchers
compile group: 'org.testinfected.hamcrest-matchers', name: 'core-matchers', version: '1.5'
// https://mvnrepository.com/artifact/org.apache.commons/commons-lang3
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
// https://mvnrepository.com/artifact/mysql/mysql-connector-java
compile group: 'mysql', name: 'mysql-connector-java', version: '8.0.16'
// https://mvnrepository.com/artifact/org.threeten/threetenbp
compile group: 'org.threeten', name: 'threetenbp', version: '1.4.0'
// https://mvnrepository.com/artifact/org.apache.ibatis/ibatis-core
compile group: 'org.apache.ibatis', name: 'ibatis-core', version: '3.0'
// https://mvnrepository.com/artifact/com.jayway.jsonpath/json-path-assert
testCompile group: 'com.jayway.jsonpath', name: 'json-path-assert', version: '2.2.0'
// https://mvnrepository.com/artifact/org.springframework.data/spring-data-jpa
compile group: 'org.springframework.data', name: 'spring-data-jpa', version: '2.2.0.RELEASE'
// https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin
compile group: 'org.apache.maven.plugins', name: 'maven-compiler-plugin', version: '3.8.1'
compile "com.netflix.spectator:spectator-ext-gc:0.105.0"
testCompile "org.flywaydb.flyway-test-extensions:flyway-dbunit-test:6.3.3"
// https://mvnrepository.com/artifact/org.flywaydb/flyway-core
compile group: 'org.flywaydb', name: 'flyway-core', version: '6.4.2'
// https://mvnrepository.com/artifact/org.springframework.security/spring-security-crypto
compile group: 'org.springframework.security', name: 'spring-security-crypto', version: '3.1.0.RELEASE'
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-security
compile group: 'org.springframework.boot', name: 'spring-boot-starter-security', version: '2.2.5.RELEASE'
// https://mvnrepository.com/artifact/com.nimbusds/nimbus-jose-jwt
compile group: 'com.nimbusds', name: 'nimbus-jose-jwt', version: '8.8'
compileOnly 'org.projectlombok:lombok:1.18.12'
annotationProcessor 'org.projectlombok:lombok:1.18.12'
testCompileOnly 'org.projectlombok:lombok:1.18.12'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.12'
testImplementation 'org.junit.platform:junit-platform-commons:1.5.2'
}
// ======== Environment configuration ========
if (hasProperty("env") == false) { ext.env = "personal" }
ext.study = new JsonSlurper().parse file("env/${env}.json")
ext {
pmdVersion = "6.21.0"
}
// flyway
task migrateDb(type: org.flywaydb.gradle.task.FlywayMigrateTask, group: "flyway", dependsOn: jar) {
doFirst {
System.setProperty("flyway.url", study.flyway.url)
System.setProperty("flyway.user", study.flyway.user)
if (study.flyway.password) {
System.setProperty("flyway.password", study.flyway.password)
}
}
}
test {
useJUnitPlatform()
}