-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
92 lines (78 loc) · 2.65 KB
/
Copy pathbuild.gradle
File metadata and controls
92 lines (78 loc) · 2.65 KB
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
plugins {
id 'org.springframework.boot' version '2.5.4'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
id 'java'
id 'jacoco'
}
group = 'com.yashbansal.navi.assignment.mymoney'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
targetCompatibility = 1.8
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
// This dependency is used by the application.
implementation 'com.google.guava:guava:30.1.1-jre'
// lombok dependency
compileOnly 'org.projectlombok:lombok:1.18.20'
annotationProcessor 'org.projectlombok:lombok:1.18.20'
// Spring dependencies
implementation 'org.springframework.boot:spring-boot-starter:2.5.4'
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.5.4'
implementation group: 'org.springframework.shell', name: 'spring-shell-starter', version: '2.0.1.RELEASE'
// Log4j
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.14.1'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.14.1'
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
manifest {
attributes 'Main-Class': 'com.yashbansal.navi.assignment.mymoney.MyMoneyApplication'
//Change this to the main class of your program which will be executed
}
// To create a single jar with all dependencies.
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
} {
exclude "META-INF/*.SF"
exclude "META-INF/*.DSA"
exclude "META-INF/*.RSA"
exclude "META-INF/**"
}
archiveBaseName = 'navi' //Please do not change this final artifact name
archiveVersion = null //Please do not change this final artifact version
}
bootJar {
archiveFileName = 'navi.jar'
}
configurations {
// to remove default logs created by spring on console
all*.exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
all*.exclude group: 'ch.qos.logback'
}
jacocoTestReport {
dependsOn test
reports {
xml.enabled true
csv.enabled false
html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it,
exclude: ['**/dto/**', '**/enums/**',
'**/config/**', '**/constant/**', '**/entity/**'
])
}))
}
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport // report is always generated after tests run
}