-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
111 lines (97 loc) · 3.16 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
104
105
106
107
108
109
110
111
plugins {
kotlin("jvm") version "1.6.0"
id("org.jetbrains.dokka") version "1.6.0"
`maven-publish`
signing
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
id("com.github.jmongard.git-semver-plugin") version "0.4.2"
}
group = "io.orange-buffalo"
version = semver.version
repositories {
mavenCentral()
}
val integrationsDependencies by configurations.creating {
isTransitive = false
}
configurations {
compileClasspath.get().extendsFrom(integrationsDependencies)
testCompileClasspath.get().extendsFrom(integrationsDependencies)
}
dependencies {
api(kotlin("stdlib"))
api("org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.2")
integrationsDependencies("com.fasterxml.jackson.core:jackson-core:2.13.0")
testImplementation("io.kotest:kotest-runner-junit5:4.6.3")
testImplementation("io.mockk:mockk:1.12.1")
testImplementation("com.fasterxml.jackson.core:jackson-databind:2.13.0")
}
tasks.test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
java {
withSourcesJar()
}
val docsJar = tasks.register<Jar>("docsJar") {
archiveClassifier.set("javadoc")
from(tasks.named("dokkaJavadoc"))
}
artifacts {
archives(docsJar)
}
publishing {
publications {
create<MavenPublication>("mavenKotlin") {
from(components["kotlin"])
artifacts {
artifact(tasks.named("sourcesJar"))
artifact(docsJar)
}
pom {
name.set("kiosab")
description.set("Kotlin IO Stream Async Bridge")
url.set("https://github.com/orange-buffalo/kiosab")
packaging = "jar"
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("orange-buffalo")
name.set("Bogdan Ilchyshyn")
email.set("[email protected]")
}
}
scm {
connection.set("scm:[email protected]:orange-buffalo/kiosab.git")
developerConnection.set("scm:[email protected]:orange-buffalo/kiosab.git")
url.set("https://github.com/orange-buffalo/kiosab")
}
}
}
}
}
signing {
val ossrhSigningKey: String? by project
val ossrhSigningPassword: String? by project
useInMemoryPgpKeys(ossrhSigningKey, ossrhSigningPassword)
sign(publishing.publications["mavenKotlin"])
}
nexusPublishing {
repositories {
create("OSSRH") {
val ossrhUser: String? by project
val ossrhPassword: String? by project
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots"))
username.set(ossrhUser)
password.set(ossrhPassword)
}
}
}