-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
109 lines (99 loc) · 2.91 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
plugins {
kotlin("multiplatform") version "1.9.22"
id("maven-publish")
id("signing")
id("org.jetbrains.dokka") version "1.9.10"
}
repositories {
mavenCentral()
}
kotlin {
group = "de.westnordost"
version = "0.1.0"
jvm()
js {
browser()
nodejs()
}
linuxX64()
linuxArm64()
mingwX64()
macosX64()
macosArm64()
iosSimulatorArm64()
iosX64()
iosArm64()
applyDefaultHierarchyTemplate()
sourceSets {
commonMain
commonTest {
dependencies {
implementation(kotlin("test"))
}
}
jvmTest {
dependencies {
implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.12")
implementation("ch.poole:OpeningHoursParser:0.28.1")
}
}
}
}
val javadocJar = tasks.register<Jar>("javadocJar") {
archiveClassifier.set("javadoc")
from(tasks.dokkaHtml)
}
publishing {
publications {
withType<MavenPublication> {
artifactId = rootProject.name + if (name != "kotlinMultiplatform") "-$name" else ""
artifact(javadocJar)
pom {
name.set("osm-opening-hours")
description.set("OpenStreetMap opening hours schema parser and generator")
url.set("https://github.com/westnordost/osm-opening-hours")
licenses {
license {
name.set("MIT License")
url.set("https://raw.githubusercontent.com/westnordost/osm-opening-hours/master/LICENSE.txt")
}
}
issueManagement {
system.set("GitHub")
url.set("https://github.com/westnordost/osm-opening-hours/issues")
}
scm {
connection.set("https://github.com/westnordost/osm-opening-hours.git")
url.set("https://github.com/westnordost/osm-opening-hours")
}
developers {
developer {
id.set("westnordost")
name.set("Tobias Zwick")
email.set("[email protected]")
}
}
}
}
}
repositories {
maven {
name = "oss"
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
val ossrhUsername: String by project
val ossrhPassword: String by project
username = ossrhUsername
password = ossrhPassword
}
}
}
}
signing {
sign(publishing.publications)
}
// FIXME - workaround for https://github.com/gradle/gradle/issues/26091
val signingTasks = tasks.withType<Sign>()
tasks.withType<AbstractPublishToMaven>().configureEach {
mustRunAfter(signingTasks)
}