generated from CodelyTV/java-ddd-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
151 lines (123 loc) · 3.91 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
139
140
141
142
143
144
145
146
147
148
149
150
// Common for all projects
allprojects {
apply plugin: 'java'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'org.springframework.boot'
sourceCompatibility = 11
targetCompatibility = 11
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/milestone' }
}
ext {
set('springCloudVersion', "Hoxton.M3")
}
ext {
set('elasticsearch.version', '6.8.4')
}
dependencies {
// Prod
implementation 'org.apache.logging.log4j:log4j-core:2.12.1'
implementation 'org.apache.logging.log4j:log4j-api:2.12.1'
implementation 'com.vlkan.log4j2:log4j2-logstash-layout:0.21'
implementation 'io.github.cdimascio:java-dotenv:5.1.3'
implementation 'org.hibernate:hibernate-core:5.4.9.Final'
implementation 'org.springframework:spring-orm:5.2.2.RELEASE'
implementation 'org.apache.tomcat:tomcat-dbcp:9.0.29'
implementation 'com.sun.xml.bind:jaxb-impl:2.3.2'
implementation 'javax.xml.bind:jaxb-api:2.3.1'
implementation 'org.springframework:spring-context-support:5.2.1.RELEASE'
implementation 'org.freemarker:freemarker-gae:2.3.29'
implementation 'org.reflections:reflections:0.9.11'
implementation 'org.springframework.boot:spring-boot-starter-amqp'
implementation 'org.elasticsearch.client:elasticsearch-rest-client:6.8.5'
implementation 'org.elasticsearch.client:elasticsearch-rest-high-level-client:6.8.4'
implementation 'mysql:mysql-connector-java:8.0.18'
// Test
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.5.2'
testImplementation 'org.mockito:mockito-core:2.+'
testImplementation 'com.github.javafaker:javafaker:1.0.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.5.2'
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
}
task view_paths {
doLast { task ->
println "$task.project.name"
println "------------------"
println "Main: $sourceSets.main.java.srcDirTrees"
println " Resources: $sourceSets.main.resources.srcDirTrees"
println "Tests: $sourceSets.test.java.srcDirTrees"
println " Resources: $sourceSets.test.resources.srcDirTrees"
}
}
}
// All subprojects (located in src/*)
subprojects {
group = "tv.codely.${rootProject.name}"
sourceSets {
main {
java { srcDirs = ['main'] }
resources { srcDirs = ['main/resources'] }
}
test {
java { srcDirs = ['test'] }
resources { srcDirs = ['test/resources'] }
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web:2.1.8.RELEASE'
testImplementation rootProject.sourceSets.main.output
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.2.1.RELEASE'
if (project.name != "shared") {
implementation project(":shared")
testImplementation project(":shared").sourceSets.test.output
}
}
bootJar {
enabled = false
}
jar {
enabled = true
}
}
// Main project (located in apps/)
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath('org.springframework.boot:spring-boot-gradle-plugin:2.2.1.RELEASE')
}
}
sourceSets {
main {
java { srcDirs = ['apps/main'] }
resources { srcDirs = ['apps/main/resources'] }
}
test {
java { srcDirs = ['apps/test'] }
resources { srcDirs = ['apps/test/resources'] }
}
}
bootJar {
baseName = 'java-ddd-skeleton'
version = '0.0.1'
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web:2.1.8.RELEASE'
implementation project(":shared")
implementation project(":backoffice")
implementation project(":mooc")
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.1.8.RELEASE'
testImplementation project(":shared").sourceSets.test.output
}