-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
134 lines (122 loc) · 3.5 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
import org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11
plugins {
signing
`maven-publish`
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.kotlinKotlinxSerialization)
alias(libs.plugins.dokka)
alias(libs.plugins.nexusPublish)
alias(libs.plugins.detekt)
}
group = "tel.schich"
version = "4.0.1-SNAPSHOT"
tasks.withType<Test> {
useJUnitPlatform()
}
tasks.withType<Jar>().configureEach {
metaInf.with(
copySpec {
from("${project.rootDir}/LICENSE")
}
)
}
repositories {
mavenCentral()
}
kotlin {
jvmToolchain(11)
jvm {
withJava()
compilations.all {
compileTaskProvider.configure {
compilerOptions {
jvmTarget.set(JVM_11)
freeCompilerArgs.add("-progressive")
}
}
}
}
js(IR) {
browser {
binaries.executable()
testTask {
enabled = false
}
}
nodejs()
}
sourceSets {
val commonMain by getting {
dependencies {
implementation(project.dependencies.platform(libs.ktorBom))
implementation(project.dependencies.platform(libs.kotlinxCoroutinesBom))
implementation(project.dependencies.platform(libs.kotlinxSerializationBom))
implementation(libs.parserKombinator)
api(libs.ktorClientCore)
api(libs.ktorClientWebsockets)
api(libs.kotlinxCoroutinesCore)
api(libs.kotlinxSerializationJson)
implementation(libs.kotlinLogging)
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test"))
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
getByName("jvmTest") {
dependencies {
implementation(libs.ktorClientJava)
implementation(libs.logbackClassic)
}
}
}
}
val javadocJar by tasks.creating(Jar::class) {
from(tasks.dokkaHtml)
dependsOn(tasks.dokkaHtml)
archiveClassifier.set("javadoc")
}
publishing {
publications {
publications.withType<MavenPublication> {
pom {
name.set("Kognigy")
description.set("A simple socket.io client for Cognigy.")
url.set("https://github.com/pschichtel/kognigy")
licenses {
license {
name.set("MIT")
url.set("https://opensource.org/licenses/MIT")
}
}
developers {
developer {
id.set("pschichtel")
name.set("Phillip Schichtel")
email.set("[email protected]")
}
}
scm {
url.set("https://github.com/pschichtel/kognigy")
connection.set("scm:git:https://github.com/pschichtel/kognigy")
developerConnection.set("scm:git:[email protected]:pschichtel/kognigy")
}
}
}
publications.named("jvm", MavenPublication::class) {
artifact(javadocJar)
}
}
}
signing {
useGpgCmd()
sign(publishing.publications)
}
nexusPublishing {
this.repositories {
sonatype()
}
}