-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
168 lines (149 loc) · 4.86 KB
/
build.gradle.kts
File metadata and controls
168 lines (149 loc) · 4.86 KB
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
160
161
162
163
164
165
166
167
168
/*
* Copyright © 2020 Techniker Krankenkasse
* Copyright © 2020 BITMARCK Service GmbH
*
* This file is part of secon-tool
* (see https://github.com/DieTechniker/secon-tool).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
group = "de.tk.opensource"
version = "1.2.1-SNAPSHOT"
application {
mainClassName = "de.tk.opensource.secon.Main"
}
dependencies {
val junitVersion = "5.6.2"
implementation("global.namespace.fun-io:fun-io-bios:2.4.0")
implementation("org.bouncycastle:bcpkix-jdk18on:1.78.1")
testImplementation(platform("io.projectreactor:reactor-bom:2020.0.2"))
testImplementation("io.projectreactor:reactor-test")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
}
plugins {
application
`java-library`
`maven-publish`
signing
id("com.github.johnrengelman.shadow") version "7.1.2"
id("biz.aQute.bnd.builder") version "6.1.0"
id("org.cadixdev.licenser") version "0.6.1"
}
repositories {
mavenCentral()
}
java {
withJavadocJar()
withSourcesJar()
}
val encoding = "UTF-8"
tasks.compileJava {
options.encoding = encoding
options.release.set(8)
}
tasks.javadoc {
options.encoding = encoding
}
tasks.jar {
manifest {
attributes(
"Sealed" to true
)
}
}
tasks.compileTestJava {
options.encoding = encoding
options.release.set(8)
}
tasks.test {
useJUnitPlatform {
excludeTags("LDAP")
}
}
tasks.register<Test>("testLdap") {
useJUnitPlatform {
includeTags("LDAP")
}
}
license {
header(project.file("LICENSE.header"))
include("**/*.java,**/*.kts")
newLine.set(false)
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
pom {
name.set("secon-tool")
description.set("A library for secure communication in the German health care and social affairs sector. Based on specifications in 'GKV Anlage 16 SECON'")
url.set("https://github.com/DieTechniker/secon-tool")
licenses {
license {
name.set("GNU Lesser General Public License, Version 3")
url.set("https://www.gnu.org/licenses/lgpl-3.0.txt")
}
}
developers {
developer {
id.set("christian-schlichtherle")
name.set("Christian Schlichtherle")
email.set("christian@schlichtherle.de")
}
developer {
id.set("loetifuss")
name.set("Wolfgang Schmiesing")
email.set("wolfgang.schmiesing@googlemail.com")
}
}
scm {
connection.set("scm:git:git://github.com/DieTechniker/secon-tool.git")
developerConnection.set("scm:git:ssh://github.com/DieTechniker/secon-tool.git")
url.set("https://github.com/DieTechniker/secon-tool")
}
}
}
}
repositories {
maven {
// MavenCentral
name = "OSSRH"
val releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
val snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
url = uri(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
/*
maven {
// GitHubPackages
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/DieTechniker/secon-tool")
credentials {
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
*/
}
}
signing {
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKey, signingPassword)
sign(publishing.publications["mavenJava"])
}