-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
109 lines (96 loc) · 3.43 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
plugins {
// Apply the groovy plugin to add support for Groovy
id 'groovy'
id 'java-library'
id 'maven-publish'
id 'signing'
id 'com.palantir.git-version' version '0.12.3'
}
repositories {
// Use jcenter for resolving your dependencies.
// You can declare any Maven/Ivy/file repository here.
mavenCentral()
}
group = 'io.github.nifty10m.jdbc-excel'
version = gitVersion()
sourceCompatibility = JavaVersion.VERSION_11
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.10'
annotationProcessor 'org.projectlombok:lombok:1.18.10'
implementation 'org.slf4j:slf4j-api:1.7.30'
implementation 'org.springframework:spring-jdbc:5.2.4.RELEASE'
testRuntime 'com.h2database:h2:1.4.200'
// poi excel export
implementation 'org.apache.poi:poi:4.1.2'
implementation 'org.apache.poi:poi-ooxml:4.1.2'
// Use the awesome Spock testing and specification framework
testImplementation 'org.spockframework:spock-core:1.3-groovy-2.5'
testImplementation 'org.spockframework:spock-spring:1.3-groovy-2.5'
// Use spring to for integration testing
testImplementation 'org.springframework.boot:spring-boot-starter-jdbc:2.2.5.RELEASE'
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.2.5.RELEASE'
}
task javadocJar(type: Jar) {
archiveClassifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'jdbc-excel'
groupId = 'io.github.nifty10m'
artifact sourcesJar
artifact javadocJar
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'jdbc-excel'
description = 'A library to create excel from jdbc'
url = "https://www.github.com/nifty10m/jdbc-excel"
licenses {
license {
name = "MIT License"
url = "http://www.opensource.org/licenses/mit-license.php"
}
}
developers {
developer {
id = "terrible_herbst"
name = "Joerg Herbst"
email = "[email protected]"
}
}
scm {
connection = "scm:git:git://github.com/nifty10m/jdbc-excel.git"
developerConnection = "scm:git:ssh://[email protected]:nifty10m/jdbc-excel.git"
url = "https://www.github.com/nifty10m/jdbc-excel"
}
}
from components.java
}
}
repositories {
maven {
def snapshotRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
def releaseRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
url = version.matches("\\d\\.\\d\\.\\d") ? releaseRepoUrl : snapshotRepoUrl
credentials {
username System.getenv("SONATYPE_USER")
password System.getenv("SONATYPE_PASSWORD")
}
}
}
}
signing {
sign publishing.publications.mavenJava
}