-
Notifications
You must be signed in to change notification settings - Fork 33
/
build.gradle
130 lines (106 loc) · 3.36 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
/*
* This file was generated by the Gradle 'init' task.
*/
plugins {
id 'java'
id 'maven-publish'
id 'signing'
id 'jacoco'
id 'com.github.johnrengelman.shadow' version '7.1.0'
}
repositories {
mavenLocal()
maven {
url = uri('https://repo.maven.apache.org/maven2/')
}
}
dependencies {
implementation 'commons-cli:commons-cli:1.4'
implementation 'commons-io:commons-io:2.11.0'
implementation 'org.apache.commons:commons-lang3:3.12.0'
implementation 'org.apache.commons:commons-csv:1.9.0'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.13.0'
implementation 'com.google.code.gson:gson:2.8.8'
testImplementation 'junit:junit:[4.13.2,)'
testImplementation 'org.mockito:mockito-all:1.10.19'
}
group = 'com.sonalake'
version = '1.1.0'
description = 'Utah Parser'
java.sourceCompatibility = JavaVersion.VERSION_1_8
java {
withSourcesJar()
withJavadocJar()
}
jar {
manifest {
attributes 'Main-Class': 'com.sonalake.utah.cli.CommandLineInterface'
}
}
shadowJar {
archiveBaseName.set('utah-parser')
archiveClassifier.set('cli')
archiveVersion.set('')
}
test {
finalizedBy jacocoTestReport
}
jacocoTestReport {
dependsOn test
reports {
xml.enabled true
}
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
ext.isForSigning = findProperty("signing.keyId")
ext.isForOssrhPublishing = findProperty('ossrhUsername')
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
if (isForSigning && isForOssrhPublishing) {
signing {
sign publishing.publications
}
publishing {
repositories {
maven {
def releaseRepo = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotRepo = "https://oss.sonatype.org/content/repositories/snapshots/"
url = isReleaseVersion ? releaseRepo : snapshotRepo
credentials {
username = findProperty('ossrhUsername')
password = findProperty('ossrhPassword')
}
}
}
publications {
mavenJava(MavenPublication) {
pom {
groupId = 'com.sonalake'
name = 'Utah Parser'
description = 'A Java library for parsing semi-structured text files'
url = 'https://github.com/sonalake/utah-parser'
from components.java
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'daniel-bray-sonalake'
name = 'Daniel Bray'
email = '[email protected]'
}
}
scm {
connection = 'scm:git:[email protected]:sonalake/utah-parser.git'
developerConnection = 'scm:git:[email protected]:sonalake/utah-parser.git'
url = 'https://github.com/sonalake/utah-parser'
}
}
}
}
}
}