/
build.gradle
116 lines (102 loc) · 3.35 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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
}
group 'com.kazurayam'
version '0.10.4'
ext.isReleaseVersion = ! version.endsWith("SNAPSHOT")
repositories {
mavenCentral()
mavenLocal()
}
ext {
}
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
def defaultEncoding = 'UTF-8'
tasks.withType(AbstractCompile).each { it.options.encoding = defaultEncoding }
tasks.withType(GroovyCompile).each {it.groovyOptions.encoding = defaultEncoding }
dependencies {
implementation libs.materialstore
implementation libs.gson
implementation libs.poi3
implementation libs.poi3.ooxml
implementation libs.commons.csv
implementation libs.pdf2dom
implementation libs.pdfbox
implementation libs.pdfbox.tools
implementation libs.rome
testImplementation libs.slf4j.api
testRuntimeOnly libs.slf4j.simple
testImplementation libs.commons.io
testImplementation libs.junit.jupiter
testImplementation libs.junit.jupiter.api
}
test {
useJUnitPlatform()
}
task javadocJar(type: Jar) {
archiveClassifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
publishing {
publications {
materialstore(MavenPublication) {
artifact sourcesJar
artifact javadocJar
pom {
groupId = project.group
name = project.rootProject.name
description = 'classes that implements com.kazurayam.materialstore.map.Mapper interface, which includes Excel->CSV conversion, PDF->Image conversion'
url = 'https://kazurayam.github.io/materialstore-mapper/'
from components.java
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'https://www.apache.org.licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'kazurayam'
name = 'URAYAMA,kazuaki'
email = 'kazuaki.urayama@gmail.com'
}
}
scm {
connection = "scm:git:https://github.com/kazurayam/${project.rootProject.name}.git"
developerConnection = "scm:git:git@github.com:kazurayam/${project.rootProject.name}.git"
url = "https://github.com/kazurayam/${project.rootProject.name}"
}
}
}
}
repositories {
maven {
def releaseRepo = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotRepo = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = isReleaseVersion ? releaseRepo: snapshotRepo
credentials {
username = project.hasProperty('ossrhUsername') ? ossrhUsername : "Unknown user"
password = project.hasProperty('ossrhPassword') ? ossrhPassword : "Unknown password"
}
}
}
}
signing {
sign publishing.publications.materialstore
}
// I do not want to sign the SNAPSHOT
tasks.withType(Sign) {
onlyIf { isReleaseVersion }
}
task copyJavadocToDocsDir(type: Copy) {
from 'build/docs/javadoc'
into 'docs/api'
}
javadoc.finalizedBy copyJavadocToDocsDir