-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
119 lines (102 loc) · 2.9 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
plugins {
id 'java'
id 'checkstyle'
id 'pmd'
id 'jacoco'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'org.owasp.dependencycheck' version '9.0.8'
id 'nebula.lint' version '19.0.1'
}
group 'no.unit.alma'
version '1.0-SNAPSHOT'
java {
sourceCompatibility = JavaVersion.VERSION_17 // source-code version and must be <= targetCompatibility
targetCompatibility = JavaVersion.VERSION_17 // bytecode target version
}
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
wrapper {
distributionType = Wrapper.DistributionType.ALL
gradleVersion = "8.5"
}
dependencies {
implementation 'com.amazonaws:aws-lambda-java-core:1.2.3'
implementation 'com.google.guava:guava:33.0.0-jre'
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'org.marc4j:marc4j:2.9.5'
implementation 'com.amazonaws:aws-lambda-java-events:3.11.4'
implementation 'com.github.BIBSYSDEV:marc21-xml-parser:2.11.5'
implementation 'org.apache.commons:commons-lang3:3.14.0'
testImplementation 'com.github.bibsysdev:core:1.36.10'
testImplementation 'org.mockito:mockito-core:5.8.0'
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.2'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
shadowJar {
archiveClassifier.set('')
zip64 true
}
tasks.named('test') {
useJUnitPlatform()
failFast = false
testLogging {
events 'skipped', 'passed', 'failed'
}
finalizedBy jacocoTestReport
}
tasks.named('jar').configure {
enabled = false
}
tasks.named('build').configure {
dependsOn tasks.named('shadowJar')
}
pmd {
ruleSetConfig = rootProject.resources.text.fromFile('config/pmd/ruleset.xml')
ruleSets = []
ignoreFailures = false
}
checkstyle {
configFile = rootProject.resources.text.fromFile('config/checkstyle/checkstyle.xml').asFile()
showViolations = true
}
tasks.withType(Checkstyle) {
reports {
xml.required
html.required
html.stylesheet = rootProject.resources.text.fromFile('config/checkstyle/checkstyle-simple.xsl')
}
}
jacocoTestReport {
reports {
html.outputLocation.set(layout.buildDirectory.dir("reports/jacoco"))
}
}
jacoco {
toolVersion = "0.8.8"
}
tasks.named('check').configure {
dependsOn tasks.named('jacocoTestCoverageVerification')
}
tasks.named('jacocoTestCoverageVerification').configure {
dependsOn tasks.named('jacocoTestReport')
violationRules {
rule {
limit {
counter = 'METHOD'
value = 'COVEREDRATIO'
minimum = 0.90
}
}
rule {
limit {
counter = 'CLASS'
value = 'COVEREDRATIO'
minimum = 1.0
}
}
}
}