forked from monitorjbl/excel-streaming-reader
-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
build.gradle
128 lines (113 loc) · 3.75 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
plugins {
id 'java-library'
id 'signing'
id 'maven-publish'
id 'io.github.gradle-nexus.publish-plugin' version "2.0.0"
id 'org.cyclonedx.bom' version "1.10.0"
id 'org.sonarqube' version "4.0.0.2929"
id 'io.github.sgtsilvio.gradle.javadoc-links' version "0.8.0"
}
sonarqube {
properties {
property "sonar.projectKey", "pjfanning_excel-streaming-reader"
property "sonar.organization", "pjfanning"
property "sonar.host.url", "https://sonarcloud.io"
// the plugin seems to not detect our non-standard build-layout
property "sonar.junit.reportPaths", "$projectDir/build/test-results/test"
}
}
group = 'com.github.pjfanning'
version = '5.0.3-SNAPSHOT'
sourceCompatibility = 1.8
java {
withJavadocJar()
withSourcesJar()
registerFeature('poiSharedStrings') {
usingSourceSet(sourceSets.main)
}
}
repositories {
mavenCentral()
}
ext {
poiVersion = '5.3.0'
poiSharedStringsVersion = '2.9.0'
slf4jVersion = '2.0.16'
}
dependencies {
api "org.apache.poi:poi:$poiVersion"
api "org.apache.poi:poi-ooxml:$poiVersion"
implementation "org.slf4j:slf4j-api:$slf4jVersion"
implementation 'commons-io:commons-io:2.18.0'
implementation 'org.apache.commons:commons-compress:1.27.1'
poiSharedStringsImplementation "com.github.pjfanning:poi-shared-strings:$poiSharedStringsVersion"
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.nanohttpd:nanohttpd:2.3.1'
testImplementation 'org.mockito:mockito-core:4.11.0'
testRuntimeOnly "org.slf4j:slf4j-simple:$slf4jVersion"
testRuntimeOnly 'org.apache.logging.log4j:log4j-to-slf4j:2.24.3'
}
test {
options {
systemProperties(System.getProperties())
}
}
tasks.named('jar') {
manifest {
attributes('Automatic-Module-Name': 'com.github.pjfanning.excelstreamingreader')
}
}
compileTestJava.dependsOn('copyLicenseToBuildResources')
jar.dependsOn('copyLicenseToBuildResources')
javadoc.dependsOn('copyLicenseToBuildResources')
nexusPublishing {
repositories {
sonatype()
}
}
publish.dependsOn cyclonedxBom
publishing {
publications {
mavenJava(MavenPublication) {
from(components.java)
pom {
name = 'excel-streaming-reader'
description = 'Streaming Excel reader'
url = 'https://github.com/pjfanning/excel-streaming-reader'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'https://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'monitorjbl'
name = 'Taylor Jones'
email = '[email protected]'
}
developer {
id = 'pjfanning'
name = 'PJ Fanning'
url = 'https://github.com/pjfanning'
}
}
scm {
url = 'https://github.com/pjfanning/excel-streaming-reader'
connection = 'scm:git://github.com/pjfanning/excel-streaming-reader.git'
developerConnection = 'scm:git://github.com/pjfanning/excel-streaming-reader.git'
}
}
}
}
}
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}
tasks.register('copyLicenseToBuildResources', Copy) {
from layout.projectDirectory.file("LICENSE")
into layout.buildDirectory.dir("resources/main/META-INF")
}