-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
158 lines (138 loc) · 4.24 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
153
154
155
156
157
158
/**
* https://github.com/ngoanh2n/csv-comparator
* @author Ho Huu Ngoan ([email protected])
* @since 1.0.0
*/
group group
version version
apply plugin: "java"
apply plugin: "idea"
apply plugin: "eclipse"
apply plugin: "signing"
apply plugin: "java-library"
apply plugin: "maven-publish"
apply plugin: "com.bmuschko.nexus"
ext {
ENCODING = "UTF-8"
GUAVA_VERSION = "28.2-jre"
SLF4J_VERSION = "1.7.30"
CSV_PARSER_VERSION = "2.8.4"
JUNIT5_JUPITER_VERSION = "5.7.0"
JUNIVERSAL_CHARDET_VERSION = "2.3.2"
}
[compileJava, compileTestJava]*.sourceCompatibility = 1.8
[compileJava, compileTestJava]*.targetCompatibility = 1.8
[compileJava, compileTestJava]*.options.collect { options -> options.debug = true }
[compileJava, compileTestJava]*.options.collect { options -> options.encoding = ENCODING }
repositories {
jcenter()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
implementation("org.slf4j:slf4j-api:${SLF4J_VERSION}")
implementation("com.google.guava:guava:${GUAVA_VERSION}")
implementation("com.univocity:univocity-parsers:${CSV_PARSER_VERSION}")
implementation("com.github.albfernandez:juniversalchardet:$JUNIVERSAL_CHARDET_VERSION")
testImplementation("org.slf4j:slf4j-log4j12:${SLF4J_VERSION}")
testImplementation("org.junit.jupiter:junit-jupiter-api:${JUNIT5_JUPITER_VERSION}")
testImplementation("org.junit.jupiter:junit-jupiter-engine:${JUNIT5_JUPITER_VERSION}")
}
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.bmuschko:gradle-nexus-plugin:2.3.1"
}
}
tasks.withType(Test).all { testTask ->
testTask.systemProperties = [
"file.encoding": ENCODING
]
testTask.testLogging.showStandardStreams = true
testTask.outputs.upToDateWhen { false }
}
tasks.withType(Test) {
/*
* Enable JUnit Platform (JUnit 5) support, default is JUnit
*/
useJUnitPlatform() {
/*
* Filter by engines
*/
includeEngines "junit-jupiter"
//excludeEngines 'junit-vintage'
/*
* Filter by tags
*/
//includeTags 'fast', 'smoke'
//excludeTags 'slow', 'ci'
}
/*
* Make failing tests do not fail the task
*/
ignoreFailures = false
/*
* To show standard out and standard error of the test JVM(s) on the console
*/
testLogging.showStandardStreams = true
/*
* Want to display the following test events
*/
testLogging { events "passed", "skipped", "failed" }
/*
* To make the Gradle JVM system properties available to tests
*/
systemProperties = System.getProperties() as Map<String, ?>
}
tasks.withType(Javadoc) {
options.addStringOption("Xdoclint:none", "-quiet")
options.addStringOption("encoding", ENCODING)
options.addStringOption("charSet", ENCODING)
}
modifyPom {
project {
inceptionYear "2019"
name "csv-comparator"
url "https://github.com/ngoanh2n/csv-comparator"
description "Utility for comparing and asserting CSV files in Java"
scm {
url "http://github.com/ngoanh2n/csv-comparator/tree/master"
connection "scm:git:git://github.com/ngoanh2n/csv-comparator.git"
developerConnection "scm:git:ssh://github.com/ngoanh2n/csv-comparator.git"
}
licenses {
license {
name "MIT"
url "https://opensource.org/licenses/MIT"
}
}
developers {
developer {
id "ngoanh2n"
name "Ho Huu Ngoan"
email "[email protected]"
organizationUrl "https://ngoanh2n.github.io"
roles {
role "Owner"
role "Developer"
}
}
}
}
}
extraArchive {
tests = true
sources = true
javadoc = true
}
nexus {
sign = true
repositoryUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
snapshotRepositoryUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
}