-
Notifications
You must be signed in to change notification settings - Fork 44
/
publish.gradle
101 lines (87 loc) · 3.06 KB
/
publish.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
task unidocJar(type: Jar, dependsOn: dokka) {
classifier 'javadoc'
from javadoc.destinationDir
}
task testDependencyJar(type: Jar, dependsOn: compileTestKotlin){
classifier 'tests'
from sourceSets.test.output
exclude '**/*CoreSpec*'
exclude '*.zip'
}
def nexusUsername = project.properties.'ossrhUsername' as String ?: 'Foo'
def nexusPassword = project.properties.'ossrhPassword' as String ?: 'Foo'
def snapshotURL = "https://oss.sonatype.org/content/repositories/snapshots/"
def publishURL = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
publishing {
repositories {
maven {
url = project.version.endsWith('SNAPSHOT') ? snapshotURL : publishURL
credentials {
username nexusUsername
password nexusPassword
}
}
}
publications {
KoalaNLP(MavenPublication) {
from components.java
artifact tasks.kotlinSourcesJar
artifact unidocJar
if (project.name.endsWith("-core")) {
artifact testDependencyJar
}
pom {
name = project.name
groupId = project.group
artifactId = project.name
version = project.version
description = "KoalaNLP는 한국어 처리의 통합 인터페이스를 지향하는 Java/Kotlin/Scala Library의 묶음입니다."
packaging "jar"
url = "http://koalanlp.github.io/koalanlp"
scm {
connection = "scm:git:git@github.com:koalanlp/koalanlp.git"
developerConnection = "scm:git:git@github.com:koalanlp/koalanlp.git"
url = "https://github.com/koalanlp/koalanlp"
}
licenses {
license {
name = "MIT License"
url = "https://tldrlegal.com/license/mit-license"
}
}
developers {
developer {
id = "nearbydelta"
name = "Bugeun Kim"
url = "http://github.com/nearbydelta"
}
}
}
}
}
}
dokka {
outputFormat = "html"
outputDirectory = javadoc.destinationDir
configuration {
reportUndocumented = true
noStdlibLink = false
sourceLink {
path = "src/main/kotlin"
url = "https://github.com/koalanlp/koalanlp/blob/master/${projectDir.name}/src/main/kotlin"
lineSuffix = "#L"
}
if (!project.name.endsWith('-core')) {
externalDocumentationLink {
url = new URL("https://koalanlp.github.io/koalanlp/api/koalanlp/")
packageListUrl = new URL("https://koalanlp.github.io/koalanlp/api/koalanlp/package-list")
}
}
includes = ["index.md"]
}
}
if (!project.version.endsWith('SNAPSHOT')) {
signing {
sign publishing.publications.KoalaNLP
}
}