-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle
110 lines (97 loc) · 3.25 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
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"
}
group = 'com.github.pjfanning'
version = '2.9.1-SNAPSHOT'
sonarqube {
properties {
property "sonar.projectKey", "pjfanning_poi-shared-strings"
property "sonar.organization", "pjfanning"
property "sonar.host.url", "https://sonarcloud.io"
}
}
description = 'Memory efficient Shared String Table and Comments Table for POI'
repositories {
mavenCentral()
}
ext {
poiVersion = '5.3.0'
slf4jVersion = '2.0.16'
}
dependencies {
implementation "org.slf4j:slf4j-api:$slf4jVersion"
implementation 'com.h2database:h2:2.2.224'
implementation "org.apache.poi:poi-ooxml:$poiVersion"
implementation "org.apache.poi:poi:$poiVersion"
implementation 'org.apache.xmlbeans:xmlbeans:5.2.2'
implementation 'org.apache.commons:commons-text:1.12.0'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.nanohttpd:nanohttpd:2.3.1'
testImplementation 'commons-io:commons-io:2.18.0'
testRuntimeOnly "org.slf4j:slf4j-simple:$slf4jVersion"
testRuntimeOnly 'org.apache.logging.log4j:log4j-to-slf4j:2.23.1'
}
java {
withJavadocJar()
withSourcesJar()
}
tasks.named('jar') {
manifest {
attributes('Automatic-Module-Name': 'com.github.pjfanning.poisharedstrings')
}
}
compileTestJava.dependsOn('copyLicenseToBuildResources')
jar.dependsOn('copyLicenseToBuildResources')
javadoc.dependsOn('copyLicenseToBuildResources')
nexusPublishing {
repositories {
sonatype()
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from(components.java)
pom {
name = 'POI Shared Strings'
description = 'Memory efficient Shared Strings Table implementation for POI streaming'
url = 'https://github.com/pjfanning/poi-shared-strings'
inceptionYear = '2018'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
distribution = 'repo'
}
}
developers {
developer {
id = 'pjfanning'
name = 'PJ Fanning'
}
}
scm {
url = 'https://github.com/pjfanning/poi-shared-strings'
connection = 'scm:git://github.com/pjfanning/poi-shared-strings.git'
developerConnection = 'scm:git://github.com/pjfanning/poi-shared-strings.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")
}