-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle.kts
140 lines (127 loc) · 3.87 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
135
136
137
138
139
140
import at.asitplus.gradle.datetime
import at.asitplus.gradle.exportIosFramework
import at.asitplus.gradle.kmmresult
import at.asitplus.gradle.napier
import at.asitplus.gradle.serialization
import at.asitplus.gradle.setupDokka
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
plugins {
kotlin("multiplatform")
kotlin("plugin.serialization")
id("signing")
id("at.asitplus.gradle.conventions")
}
val artifactVersion: String by extra
version = artifactVersion
kotlin {
jvm()
macosArm64()
macosX64()
tvosArm64()
tvosX64()
tvosSimulatorArm64()
iosX64()
iosArm64()
iosSimulatorArm64()
listOf(
js(IR).apply { browser { testTask { enabled = false } } },
@OptIn(ExperimentalWasmDsl::class)
wasmJs().apply { browser { testTask { enabled = false } } }
).forEach {
it.nodejs()
}
linuxX64()
linuxArm64()
mingwX64()
sourceSets {
all {
languageSettings.optIn("kotlin.ExperimentalUnsignedTypes")
}
commonMain {
dependencies {
api(project(":indispensable"))
implementation(project(":internals"))
implementation(libs.okio)
api(libs.multibase)
implementation(libs.bignum) //Intellij bug work-around
}
}
jvmTest {
dependencies {
implementation(libs.jose)
implementation(project(":supreme"))
}
}
}
}
exportIosFramework(
"IndispensableJosef",
transitiveExports=false,
serialization("json"),
datetime(),
kmmresult(),
project(":indispensable"),
project(":indispensable-asn1"),
libs.bignum
)
val javadocJar = setupDokka(
baseUrl = "https://github.com/a-sit-plus/signum/tree/main/",
multiModuleDoc = true
)
publishing {
publications {
withType<MavenPublication> {
if (this.name != "relocation") artifact(javadocJar)
pom {
name.set("Indispensable Josef")
description.set("Kotlin Multiplatform Crypto Library - JOSE Addons")
url.set("https://github.com/a-sit-plus/signum")
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("JesusMcCloud")
name.set("Bernd Prünster")
email.set("bernd.pruenster@a-sit.at")
}
developer {
id.set("nodh")
name.set("Christian Kollmann")
email.set("christian.kollmann@a-sit.at")
}
developer {
id.set("n0900")
name.set("Simon Müller")
email.set("simon.mueller@a-sit.at")
}
}
scm {
connection.set("scm:git:git@github.com:a-sit-plus/signum.git")
developerConnection.set("scm:git:git@github.com:a-sit-plus/signum.git")
url.set("https://github.com/a-sit-plus/signum")
}
}
}
}
repositories {
mavenLocal {
signing.isRequired = false
}
maven {
url = uri(layout.projectDirectory.dir("..").dir("repo"))
name = "local"
signing.isRequired = false
}
}
}
signing {
val signingKeyId: String? by project
val signingKey: String? by project
val signingPassword: String? by project
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign(publishing.publications)
}