-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathbuild.gradle
159 lines (109 loc) · 3.85 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
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'maven'
apply plugin: 'signing'
repositories {
mavenLocal()
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
group = 'io.github.millij'
version = '3.2.0'
dependencies {
// Main compile
// ----------------------------------------------------------------------------------
// Slf4j
implementation group: 'org.slf4j', name: 'slf4j-api', version: '2.0.3'
// Apache Commons
implementation group: 'commons-beanutils', name: 'commons-beanutils', version: '1.9.4'
// Apache POI
implementation group: 'org.apache.poi', name: 'poi', version: '5.2.5'
implementation group: 'org.apache.poi', name: 'poi-ooxml', version: '5.2.5'
// Test compile
// ----------------------------------------------------------------------------------
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.19.0'
testImplementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j2-impl', version: '2.19.0'
testImplementation group: 'junit', name: 'junit', version: '4.12'
}
// Test
// ----------------------------------------------------------------------------
test {
systemProperties 'property': 'value'
}
// Java
// ----------------------------------------------------------------------------
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives jar
archives javadocJar
archives sourcesJar
}
// Signing
signing {
sign configurations.archives
}
// JaCoCo
// ----------------------------------------------------------------------------
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
jacocoTestReport.dependsOn test
check.dependsOn jacocoTestReport
// CheckStyle
// ----------------------------------------------------------------------------
// Release
// ----------------------------------------------------------------------------
uploadArchives {
repositories {
mavenDeployer {
// Sign Artifacts before deploying
beforeDeployment {
MavenDeployment deployment -> signing.signPom(deployment)
}
// Staging Repo
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
// Snapshot Repo
snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots/") {
authentication(userName: ossrhUsername, password: ossrhPassword)
}
// Project Info to generate POM
pom.project {
name 'Object Mapper for Apache POI'
packaging 'jar'
description 'Objects mapper for Office formats - Excel files, Spreadsheets, etc. '
url 'https://millij.github.io/poi-object-mapper/'
scm {
url 'https://github.com/millij/poi-object-mapper.git'
connection 'scm:git:https://github.com/millij/poi-object-mapper.git'
developerConnection 'scm:git:https://github.com/millij/poi-object-mapper.git'
}
licenses {
license {
name 'MIT License'
url 'https://opensource.org/licenses/mit-license.php'
}
}
developers {
developer {
id 'millij'
name 'Gowri Shankar'
email '[email protected]'
}
}
} // POM
} // mavenDeployer
}
}