-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
119 lines (101 loc) · 3.01 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
plugins {
id 'com.github.johnrengelman.shadow' version '5.0.0'
}
apply plugin: 'maven'
apply plugin: 'jacoco'
apply plugin: 'eclipse-wtp'
apply plugin: 'java'
group = 'ca.umanitoba.dam.rdfhashing'
repositories {
mavenCentral()
mavenLocal()
}
ext {
buildName = "rdf-hashing"
versions = [
apacheHttp : '4.5.7',
commonsCli : '1.4',
commonsIo : '1.3.2',
jenaRdf : '0.5.0',
logback : '1.2.3',
junit : '5.3.0',
slf4j : '1.7.29',
wireMock : '2.22.0'
]
}
dependencies {
implementation "commons-cli:commons-cli:${versions.commonsCli}"
implementation "org.slf4j:slf4j-api:${versions.slf4j}"
implementation "org.apache.commons:commons-rdf-jena:${versions.jenaRdf}"
implementation "org.apache.httpcomponents:httpclient:${versions.apacheHttp}"
runtimeOnly "org.slf4j:slf4j-log4j12:${versions.slf4j}"
runtimeOnly "ch.qos.logback:logback-classic:${versions.logback}"
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: versions.junit
testImplementation group: 'com.github.tomakehurst', name: 'wiremock', version: versions.wireMock
testRuntime group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: versions.junit
testRuntime group: 'org.apache.commons', name: 'commons-io', version: versions.commonsIo
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
// Make a sources jar (if you want it)
task sourceJar(type: Jar) {
classifier 'sources'
from sourceSets.main.allSource
archiveBaseName = buildName
}
task javadocJar(type: Jar) {
classifier 'javadoc'
from javadoc
archiveBaseName = buildName
}
// Make our JAR file
jar {
manifest {
attributes 'Implementation-Title': buildName,
'Implementation-Version': project.version,
'Description': project.description
}
archiveBaseName = buildName
version = project.version
}
shadowJar {
baseName = buildName
classifier = "all"
version = project.version
manifest {
attributes 'Implementation-Title': buildName,
'Implementation-Version': project.version,
'Description': project.description,
'Main-Class': project.group + '.HashCli'
}
}
artifacts {
archives javadocJar
archives sourceJar
archives shadowJar
}
test {
// Requires gradle 4.6 or greater
useJUnitPlatform()
testLogging {
// Make sure output from
// standard out or error is shown
// in Gradle output.
// showStandardStreams = true
//events 'standard_out', 'standard_error'
events "passed", "skipped", "failed"
exceptionFormat = 'full'
}
}
task codeCoverageReport(type: JacocoReport) {
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
sourceSets sourceSets.main
reports {
xml.enabled true
xml.destination file("${buildDir}/reports/jacoco/report.xml")
html.enabled false
csv.enabled false
}
}