-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
70 lines (57 loc) · 2.62 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
plugins {
id 'org.springframework.boot' version '3.1.3'
id 'io.spring.dependency-management' version '1.1.3'
id 'java'
id 'application'
}
group = 'com.hegde'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'
targetCompatibility = '17'
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/milestone' }
}
// In multi module project we need to specify the main class, because this contains some sub projects which don't have
// main class. So we need to explicitly should provide the main class.
mainClassName = 'com.hegde.todo.TodoAppApplication'
//Apply these properties to all sub-projects
subprojects {
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
dependencies {
implementation('org.springframework.boot:spring-boot-starter-web')
implementation('org.springframework.boot:spring-boot-starter-validation')
//Java Persistence API.
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
//Logging
implementation('ch.qos.logback:logback-core')
implementation('ch.qos.logback:logback-classic')
//Actuator
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: '3.1.5'
implementation group: 'org.springframework.data', name: 'spring-data-rest-hal-browser', version: '3.3.9.RELEASE'
//MapStruct
implementation 'org.mapstruct:mapstruct:1.4.2.Final'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.4.2.Final'
annotationProcessor 'org.projectlombok:lombok-mapstruct-binding:0.2.0'
runtimeOnly('com.mysql:mysql-connector-j')
compileOnly('org.projectlombok:lombok')
annotationProcessor('org.projectlombok:lombok')
testCompileOnly('org.projectlombok:lombok')
testAnnotationProcessor('org.projectlombok:lombok')
developmentOnly('org.springframework.boot:spring-boot-devtools')
testImplementation('org.springframework.boot:spring-boot-starter-test')
}
// Since some our sub projects are not spring boot applications we need to disable this. Otherwise the spring boot
// plugin will try to create the boot jar for non spring boot sub projects. So we are disabling this for all sub projects.
// This will result in creating normal jars. But since we have added the spring boot plugin in global build file,
// ultimately boot jar (fat jar will be created).
bootJar {
// enabled = false
mainClass.set('com.hegde.todo.TodoAppApplication')
}
}
tasks.withType(Test) {
useJUnitPlatform()
}