-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
169 lines (150 loc) · 5.59 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
159
160
161
162
163
164
165
166
167
168
169
plugins {
id 'groovy'
id 'maven-publish'
id 'signing'
// id 'io.github.gradle-nexus.publish-plugin' version '1.1.0'
}
targetCompatibility = 1.8
sourceCompatibility = 1.8
group = 'com.github.chubbard'
//version = '1.1.7'
version = '1.1.9'
description = """
A simplified standalone ETL engine for groovy. Gratum is groovy + datum.
"""
repositories {
mavenCentral()
}
dependencies {
implementation group: 'commons-io', name: 'commons-io', version: '2.8.0'
implementation group: 'commons-codec', name: 'commons-codec', version: '1.15'
implementation group: 'commons-cli', name: 'commons-cli', version: '1.4'
implementation('org.codehaus.groovy:groovy-all:2.5.23') {
exclude group: 'org.codehaus.groovy', module:'groovy-swing'
exclude group: 'org.codehaus.groovy', module:'groovy-testng'
exclude group: 'org.codehaus.groovy', module:'groovy-console'
exclude group: 'org.codehaus.groovy', module:'groovy-docgenerator'
exclude group: 'org.codehaus.groovy', module:'groovy-ant'
// exclude group: 'org.codehaus.groovy', module:'groovy-groovydoc'
exclude group: 'org.codehaus.groovy', module:'groovy-groovysh'
}
implementation 'io.github.http-builder-ng:http-builder-ng-core:1.0.3'
// implementation 'org.apache.poi:poi:5.2.2'
// implementation 'org.apache.poi:poi-ooxml:5.2.2'
// implementation 'org.apache.poi:poi-ooxml-lite:5.2.2'
implementation 'org.apache.poi:poi:4.1.2'
implementation 'org.apache.poi:poi-ooxml:4.1.2'
implementation 'org.apache.poi:ooxml-schemas:1.4'
implementation group: "org.apache.commons", name:"commons-compress", version:"1.21"
implementation group: "com.jcraft", name: "jsch", version: "0.1.55"
implementation "org.bouncycastle:bcprov-jdk15on:1.70",
"org.bouncycastle:bcprov-ext-jdk15on:1.70",
"org.bouncycastle:bcpg-jdk15on:1.70",
"org.bouncycastle:bcpkix-jdk15on:1.70"
// testCompile "mysql:mysql-connector-java:5.1.40"
// testImplementation group: 'junit', name: 'junit', version: '4.13.2'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.1'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.9.1'
}
task sourceJar(type: Jar) {
classifier 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier 'javadoc'
from javadoc.destinationDir
}
task groovydocJar(type: Jar, dependsOn: groovydoc ) {
classifier 'groovydoc'
from groovydoc.destinationDir
}
artifacts {
archives jar
archives javadocJar
archives groovydocJar
archives sourceJar
}
signing {
// //sign publishing.publications.maven
required { !version.endsWith("SNAPSHOT") && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
publishing {
publications {
gratum(MavenPublication) {
from components.java
artifact sourceJar
artifact groovydocJar
artifact javadocJar
pom {
name = project.name
description = project.description
url = 'https://github.com/chubbard/gratum'
licenses {
license {
name = "The Apache License, Version 2.0"
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
developers {
developer {
id = "chubbard"
name = "Charlie Hubbard"
email = "gratum@fuseanalytics.com"
}
}
scm {
connection = "scm:https://github.com/chubbard/gratum.git"
developerConnection = "scm:https://github.com/chubbard/gratum.git"
url = "https://github.com/chubbard/gratum.git"
}
}
pom.withXml {
def pomFile = file("${project.buildDir}/generated-pom.xml")
writeTo(pomFile)
def pomAscFile = signing.sign(pomFile).signatureFiles[0]
artifact(pomAscFile) {
classifier = null
extension = 'pom.asc'
}
}
// create the signed artifacts
project.tasks.signArchives.signatureFiles.each {
artifact(it) {
println( it.file.name )
def matcher = it.file =~ /-(sources|javadoc|groovydoc)\.jar\.asc$/
if (matcher.find()) {
classifier = matcher.group(1)
} else {
classifier = null
}
extension = 'jar.asc'
}
}
}
}
repositories {
maven {
url project.version.endsWith('-SNAPSHOT') ? "https://oss.sonatype.org/content/repositories/snapshots/" : "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username System.getenv("sonatypeUsername") ?: sonatypeUsername
password System.getenv("sonatypePassword") ?: sonatypePassword
}
}
mavenLocal()
}
}
model {
tasks.generatePomFileForGratumPublication {
destination = file("$buildDir/generated-pom.xml")
}
tasks.publishGratumPublicationToMavenLocal {
dependsOn project.tasks.signArchives
}
tasks.publishGratumPublicationToMavenRepository {
dependsOn project.tasks.signArchives
}
}
tasks.named('wrapper') {
gradleVersion = '5.6.4'
}