-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
152 lines (124 loc) · 4.95 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
151
152
buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
}
dependencies {
classpath "gradle.plugin.com.github.johnrengelman:shadow:7.1.2"
}
}
plugins {
id 'java'
id 'checkstyle'
id 'pmd'
id 'jacoco'
id 'application'
id "com.github.johnrengelman.shadow" version "7.1.2"
id 'nebula.lint' version '17.7.0'
}
group 'no.sikt.nva'
version '1.2'
sourceCompatibility = JavaVersion.VERSION_11 // source-code version and must be <= targetCompatibility
targetCompatibility = JavaVersion.VERSION_11 // bytecode target version
repositories {
mavenCentral()
}
application {
mainClass = "no.sikt.nva.BrageMigrationCommand"
}
shadowJar {
//Prevents multiple log4j configurations into the jar.
transform(com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer)
}
dependencies {
implementation group: 'com.opencsv', name: 'opencsv', version: '5.7.1'
implementation 'org.jetbrains:annotations:20.1.0'
testImplementation group: 'org.hamcrest', name: 'hamcrest', version: '2.2'
testImplementation group: 'org.hamcrest', name: 'hamcrest-core', version: '2.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.8.2'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.8.2'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.8.2'
testImplementation group: 'org.mockito', name: 'mockito-junit-jupiter', version: '4.2.0'
testImplementation group: 'org.mockito', name: 'mockito-core', version: '4.2.0'
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.36'
implementation group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.17.2'
implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.17.2'
implementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j18-impl', version: '2.17.2'
implementation group: 'info.picocli', name: 'picocli', version: '4.7.0'
annotationProcessor 'info.picocli:picocli-codegen:4.7.0'
implementation group: "software.amazon.awssdk", name: "s3", version: "2.17.191"
implementation group: "com.amazonaws", name: "aws-java-sdk-sts", version: "1.12.609"
implementation group: 'com.github.bibsysdev', name: 'core', version: '1.27.2'
implementation group: 'com.github.bibsysdev', name: 'json', version: '1.27.2'
implementation group: 'com.github.bibsysdev', name: 'doi', version: '1.27.2'
implementation group: 'com.github.bibsysdev', name: 's3', version: '1.27.2'
testImplementation group: 'com.github.bibsysdev', name: 'nvatestutils', version: '1.27.2'
implementation group: 'com.github.bibsysdev', name: 'logutils', version: '1.27.2'
implementation group: 'org.glassfish.jaxb', name: 'jaxb-runtime', version: '4.0.0'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.14.1'
implementation 'com.io-informatics.oss:jackson-jsonld:0.1.1'
implementation group: 'org.apache.jena', name: 'jena-core', version: '4.6.1'
implementation group: 'org.apache.jena', name: 'jena-arq', version: '4.6.1'
implementation group: 'commons-validator', name: 'commons-validator', version: '1.7'
implementation group: 'joda-time', name: 'joda-time', version: '2.0'
implementation project(':brage-migration-common')
implementation project(':post-to-aws')
implementation 'org.apache.poi:poi:5.2.2'
implementation 'org.apache.poi:poi-ooxml:5.2.2'
implementation 'org.apache.any23:apache-any23-core:2.7'
}
compileJava {
//Needed for picoli annotation processor:
options.compilerArgs += ["-Aproject=${project.group}/${project.name}"]
}
pmd {
ruleSetConfig = rootProject.resources.text.fromFile('config/pmd/ruleset.xml')
ruleSets = []
ignoreFailures = false
}
tasks.named('test') {
useJUnitPlatform {
excludeTags "RemoteTest"
}
failFast = true
finalizedBy jacocoTestReport
}
tasks.withType(Checkstyle).configureEach {
reports {
xml.enabled false
html.enabled true
html.stylesheet rootProject.resources.text.fromFile('config/checkstyle/checkstyle-simple.xsl')
}
}
gradleLint {
rules = ['all-dependency']
reportFormat = 'html'
reportOnlyFixableViolations = true
}
jacocoTestReport {
reports {
xml.enabled true
csv.enabled false
html.destination file("${buildDir}/reports/jacoco")
}
}
check.dependsOn jacocoTestCoverageVerification
jacocoTestCoverageVerification.dependsOn(jacocoTestReport)
jacocoTestCoverageVerification {
violationRules {
rule {
limit {
counter = 'METHOD'
value = 'COVEREDRATIO'
minimum = 0.8
}
}
rule {
limit {
counter = 'CLASS'
value = 'COVEREDRATIO'
minimum = 0.8
}
}
}
}