-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
103 lines (86 loc) · 2.68 KB
/
build.gradle.kts
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
import java.net.URI
plugins {
`java-library`
`maven-publish`
signing
}
group = "fi.evident.raudikko"
version = "0.1.4"
repositories {
mavenCentral()
}
dependencies {
compileOnly("org.jetbrains:annotations:20.1.0")
testCompileOnly("org.jetbrains:annotations:20.1.0")
testImplementation("org.puimula.voikko:libvoikko:4.1.1")
testImplementation(platform("org.junit:junit-bom:5.7.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
}
java {
withJavadocJar()
withSourcesJar()
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
vendor.set(JvmVendorSpec.ADOPTOPENJDK)
}
}
tasks.javadoc {
// Silence doclint's warnings about missing @param and @return tags
(options as CoreJavadocOptions).addStringOption("Xdoclint:-missing", "-quiet")
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
tasks.withType<Javadoc> {
options.encoding = "UTF-8"
}
tasks.test {
useJUnitPlatform()
}
publishing {
publications {
create<MavenPublication>("raudikko") {
from(components["java"])
pom {
name.set("Raudikko")
description.set("Morphological analysis for Finnish")
url.set("https://github.com/evidentsolutions/raudikko")
licenses {
license {
name.set("GNU General Public License, version 3")
url.set("https://opensource.org/licenses/GPL-3.0")
}
}
developers {
developer {
id.set("komu")
name.set("Juha Komulainen")
}
}
scm {
connection.set("scm:git:git@github.com:evidentsolutions/raudikko.git")
developerConnection.set("scm:git:git@github.com:evidentsolutions/raudikko.git")
url.set("https://github.com/evidentsolutions/raudikko")
}
}
}
}
if (hasProperty("sonatypeUsername")) {
repositories {
maven {
name = "sonatype"
url = if (version.toString().endsWith("-SNAPSHOT"))
URI("https://oss.sonatype.org/content/repositories/snapshots/")
else
URI("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = property("sonatypeUsername") as String
password = property("sonatypePassword") as String
}
}
}
}
}
signing {
sign(publishing.publications["raudikko"])
}