-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
138 lines (119 loc) · 4.82 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
137
138
plugins {
id 'java'
id 'org.springframework.boot' version '2.4.4'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id "org.flywaydb.flyway" version "7.5.2"
}
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
// Disable bootJar for main project
bootJar {
enabled = false
}
def junit5Version = '5.3.1'
def mysqlConnectorVersion = '8.0.22'
def mybatisStarterVersion = '2.1.4'
def jMapperVersion = '1.6.1.CR2'
def micrometerVersion = '1.6.5'
// To customize a managed version of SLF4J which is controlled by the slf4j.version property
ext['slf4j.version'] = '1.7.20'
apply from: file("${rootDir}/gradle/project.gradle")
// Configure db migration module
configure(subprojects.findAll { it.name.endsWith('-db-migration') }) {
apply from: file("${rootDir}/gradle/db-migration.gradle")
dependencies {
implementation 'org.flywaydb:flyway-core'
runtimeOnly "mysql:mysql-connector-java:${mysqlConnectorVersion}"
}
bootJar {
enabled = false
}
}
// Configure unit test lib for projects except db migration
configure(subprojects.findAll { !it.name.endsWith('-db-migration') }) {
dependencies {
implementation 'cn.hutool:hutool-all:5.6.1'
implementation 'org.javatuples:javatuples:1.2'
testImplementation "org.junit.jupiter:junit-jupiter-api:${junit5Version}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junit5Version}"
}
}
// Configure jar package for sub projects
configure([project(':back-office-common'),
project(':back-office-domain'),
project(':back-office-persistence'),
project(':back-office-service')]) {
bootJar {
enabled = false
}
jar {
enabled = true
}
}
project(':back-office-common') {
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
}
}
project(':back-office-domain') {
dependencies {
implementation project(':back-office-common')
implementation 'org.springframework.boot:spring-boot-starter'
implementation "org.mybatis.spring.boot:mybatis-spring-boot-starter:${mybatisStarterVersion}"
}
}
project(':back-office-persistence') {
dependencies {
implementation project(':back-office-common')
implementation project(':back-office-domain')
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-web'
// implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation "io.lettuce:lettuce-core:6.1.0.RELEASE"
implementation "org.redisson:redisson:3.15.4"
implementation "org.mybatis.spring.boot:mybatis-spring-boot-starter:${mybatisStarterVersion}"
implementation "com.googlecode.jmapper-framework:jmapper-core:${jMapperVersion}"
runtimeOnly "mysql:mysql-connector-java:${mysqlConnectorVersion}"
testRuntimeOnly "mysql:mysql-connector-java:${mysqlConnectorVersion}"
}
}
project(':back-office-service') {
dependencies {
implementation project(':back-office-common')
implementation project(':back-office-domain')
implementation project(':back-office-persistence')
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.springframework.boot:spring-boot-starter-jdbc'
implementation "com.googlecode.jmapper-framework:jmapper-core:${jMapperVersion}"
}
}
project(':back-office-web') {
apply from: file("${rootDir}/gradle/app.gradle")
dependencies {
implementation project(':back-office-common')
implementation project(':back-office-domain')
implementation project(':back-office-service')
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-undertow'
implementation "org.mybatis.spring.boot:mybatis-spring-boot-starter:${mybatisStarterVersion}"
implementation "com.googlecode.jmapper-framework:jmapper-core:${jMapperVersion}"
implementation "com.nimbusds:nimbus-jose-jwt:latest.release"
implementation "io.micrometer:micrometer-registry-prometheus:${micrometerVersion}"
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
// developmentOnly 'org.springframework.boot:spring-boot-devtools'
}
configurations {
implementation.exclude module: "spring-boot-starter-tomcat"
}
test {
useJUnitPlatform()
}
}