Skip to content

Commit 88e31cd

Browse files
committed
1 parent bae2d88 commit 88e31cd

14 files changed

+302
-337
lines changed

benchmarks/build.gradle.kts

+1-12
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
description = "Benchmarks for kotlin-result."
2-
31
plugins {
4-
kotlin("multiplatform")
52
id("org.jetbrains.kotlinx.benchmark")
63
id("org.jetbrains.kotlin.plugin.allopen")
4+
id("kotlin-conventions")
75
}
86

97
allOpen {
@@ -19,15 +17,6 @@ benchmark {
1917
}
2018

2119
kotlin {
22-
jvmToolchain(8)
23-
24-
jvm {
25-
}
26-
27-
js(IR) {
28-
nodejs()
29-
}
30-
3120
sourceSets {
3221
val commonMain by getting {
3322
dependencies {

benchmarks/gradle.properties

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
description=Benchmarks for kotlin-result.

build.gradle.kts

-249
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,11 @@
11
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
22
import com.github.benmanes.gradle.versions.updates.gradle.GradleReleaseChannel
3-
import org.jetbrains.dokka.gradle.DokkaTask
4-
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
5-
import org.jetbrains.kotlin.gradle.plugin.KotlinMultiplatformPluginWrapper
6-
7-
val ossrhUsername: String? by project
8-
val ossrhPassword: String? by project
9-
10-
val signingKeyId: String? by project // must be the last 8 digits of the key
11-
val signingKey: String? by project
12-
val signingPassword: String? by project
13-
14-
description = "A Result monad for modelling success or failure operations."
153

164
plugins {
17-
base
185
alias(libs.plugins.versions)
196

20-
alias(libs.plugins.kotlin.multiplatform) apply false
217
alias(libs.plugins.kotlin.benchmark) apply false
228
alias(libs.plugins.kotlin.allopen) apply false
23-
alias(libs.plugins.dokka) apply false
249
}
2510

2611
tasks.withType<DependencyUpdatesTask> {
@@ -32,237 +17,3 @@ tasks.withType<DependencyUpdatesTask> {
3217
}
3318
}
3419
}
35-
36-
subprojects {
37-
plugins.withType<MavenPublishPlugin> {
38-
apply(plugin = "org.gradle.signing")
39-
40-
plugins.withType<KotlinMultiplatformPluginWrapper> {
41-
apply(plugin = "org.jetbrains.dokka")
42-
43-
val dokkaHtml by tasks.existing(DokkaTask::class)
44-
45-
val javadocJar by tasks.registering(Jar::class) {
46-
group = LifecycleBasePlugin.BUILD_GROUP
47-
description = "Assembles a jar archive containing the Javadoc API documentation."
48-
archiveClassifier.set("javadoc")
49-
from(dokkaHtml)
50-
}
51-
52-
tasks.withType<Jar> {
53-
from(rootDir.resolve("LICENSE")) {
54-
into("META-INF")
55-
}
56-
}
57-
58-
configure<KotlinMultiplatformExtension> {
59-
explicitApi()
60-
61-
jvmToolchain(8)
62-
63-
jvm {
64-
mavenPublication {
65-
artifact(javadocJar.get())
66-
}
67-
}
68-
69-
js(IR) {
70-
browser()
71-
nodejs()
72-
}
73-
74-
linuxX64()
75-
76-
mingwX64()
77-
78-
macosArm64()
79-
macosX64()
80-
81-
iosArm64()
82-
iosSimulatorArm64()
83-
iosX64()
84-
85-
tvosArm64()
86-
tvosSimulatorArm64()
87-
tvosX64()
88-
89-
watchosArm32()
90-
watchosArm64()
91-
watchosSimulatorArm64()
92-
watchosX64()
93-
}
94-
}
95-
96-
configure<PublishingExtension> {
97-
repositories {
98-
maven {
99-
if (project.version.toString().endsWith("SNAPSHOT")) {
100-
setUrl("https://oss.sonatype.org/content/repositories/snapshots")
101-
} else {
102-
setUrl("https://oss.sonatype.org/service/local/staging/deploy/maven2")
103-
}
104-
105-
credentials {
106-
username = ossrhUsername
107-
password = ossrhPassword
108-
}
109-
}
110-
}
111-
112-
publications.withType<MavenPublication> {
113-
pom {
114-
name.set(project.name)
115-
url.set("https://github.com/michaelbull/kotlin-result")
116-
inceptionYear.set("2017")
117-
118-
licenses {
119-
license {
120-
name.set("ISC License")
121-
url.set("https://opensource.org/licenses/isc-license.txt")
122-
}
123-
}
124-
125-
developers {
126-
developer {
127-
name.set("Michael Bull")
128-
url.set("https://www.michael-bull.com")
129-
}
130-
}
131-
132-
contributors {
133-
contributor {
134-
name.set("Kevin Herron")
135-
url.set("https://github.com/kevinherron")
136-
}
137-
138-
contributor {
139-
name.set("Markus Padourek")
140-
url.set("https://github.com/Globegitter")
141-
}
142-
143-
contributor {
144-
name.set("Tristan Hamilton")
145-
url.set("https://github.com/Munzey")
146-
}
147-
148-
contributor {
149-
name.set("Joseph Van der Wee")
150-
url.set("https://github.com/jvanderwee")
151-
}
152-
153-
contributor {
154-
name.set("Gregory Inouye")
155-
url.set("https://github.com/gregoryinouye")
156-
}
157-
158-
contributor {
159-
name.set("Thomas Oddsund")
160-
url.set("https://github.com/oddsund")
161-
}
162-
163-
contributor {
164-
name.set("Jan Müller")
165-
url.set("https://github.com/DerYeger")
166-
}
167-
168-
contributor {
169-
name.set("avently")
170-
url.set("https://github.com/avently")
171-
}
172-
173-
contributor {
174-
name.set("gsteckman")
175-
url.set("https://github.com/gsteckman")
176-
}
177-
178-
contributor {
179-
name.set("Mathias Guelton")
180-
url.set("https://github.com/mguelton")
181-
}
182-
183-
contributor {
184-
name.set("Jordan Bergin")
185-
url.set("https://github.com/MrBergin")
186-
}
187-
188-
contributor {
189-
name.set("Pablo Gonzalez Alonso")
190-
url.set("https://pablisco.com/")
191-
}
192-
193-
contributor {
194-
name.set("Joseph Cooper")
195-
url.set("https://grodin.github.io/")
196-
}
197-
198-
contributor {
199-
name.set("Sebastian Kappen")
200-
url.set("https://github.com/Nimelrian")
201-
}
202-
203-
contributor {
204-
name.set("Dmitry Suzdalev")
205-
url.set("https://github.com/dimsuz")
206-
}
207-
208-
contributor {
209-
name.set("Berik Visschers")
210-
url.set("https://visschers.nu/")
211-
}
212-
213-
contributor {
214-
name.set("Matthew Nelson")
215-
url.set("https://matthewnelson.io/")
216-
}
217-
218-
contributor {
219-
name.set("Matthias Geisler")
220-
url.set("https://github.com/bitPogo")
221-
}
222-
223-
contributor {
224-
name.set("Kirill Zhukov")
225-
url.set("https://github.com/kirillzh")
226-
}
227-
228-
contributor {
229-
name.set("Peter Cunderlik")
230-
url.set("https://github.com/peter-cunderlik-kmed")
231-
}
232-
233-
contributor {
234-
name.set("YuitoSato")
235-
url.set("https://github.com/YuitoSato")
236-
}
237-
238-
contributor {
239-
name.set("Dmitry Bock")
240-
url.set("https://github.com/Jhabkin")
241-
}
242-
}
243-
244-
scm {
245-
connection.set("scm:git:https://github.com/michaelbull/kotlin-result")
246-
developerConnection.set("scm:git:[email protected]:michaelbull/kotlin-result.git")
247-
url.set("https://github.com/michaelbull/kotlin-result")
248-
}
249-
250-
issueManagement {
251-
system.set("GitHub")
252-
url.set("https://github.com/michaelbull/kotlin-result/issues")
253-
}
254-
255-
ciManagement {
256-
system.set("GitHub")
257-
url.set("https://github.com/michaelbull/kotlin-result/actions?query=workflow%3Aci")
258-
}
259-
}
260-
}
261-
262-
configure<SigningExtension> {
263-
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
264-
sign(publications)
265-
}
266-
}
267-
}
268-
}

buildSrc/build.gradle.kts

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
plugins {
2+
`kotlin-dsl`
3+
}
4+
5+
dependencies {
6+
implementation(libs.kotlin.gradle.plugin)
7+
}

buildSrc/settings.gradle.kts

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
pluginManagement {
2+
repositories {
3+
mavenCentral()
4+
gradlePluginPortal()
5+
}
6+
}
7+
8+
dependencyResolutionManagement {
9+
repositories {
10+
mavenCentral()
11+
gradlePluginPortal()
12+
}
13+
14+
versionCatalogs {
15+
create("libs") {
16+
from(files("../gradle/libs.versions.toml"))
17+
}
18+
}
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
plugins {
2+
kotlin("multiplatform")
3+
}
4+
5+
kotlin {
6+
jvmToolchain(8)
7+
8+
jvm()
9+
10+
js(IR) {
11+
browser()
12+
nodejs()
13+
}
14+
15+
linuxX64()
16+
17+
mingwX64()
18+
19+
macosArm64()
20+
macosX64()
21+
22+
iosArm64()
23+
iosSimulatorArm64()
24+
iosX64()
25+
26+
tvosArm64()
27+
tvosSimulatorArm64()
28+
tvosX64()
29+
30+
watchosArm32()
31+
watchosArm64()
32+
watchosSimulatorArm64()
33+
watchosX64()
34+
35+
sourceSets {
36+
all {
37+
languageSettings.apply {
38+
optIn("kotlin.contracts.ExperimentalContracts")
39+
}
40+
}
41+
42+
commonTest {
43+
dependencies {
44+
implementation(kotlin("test"))
45+
}
46+
}
47+
48+
jvmTest {
49+
dependencies {
50+
implementation(kotlin("test-junit"))
51+
}
52+
}
53+
54+
jsTest {
55+
dependencies {
56+
implementation(kotlin("test-js"))
57+
}
58+
}
59+
}
60+
}
61+
62+
tasks.withType<Jar> {
63+
from(rootDir.resolve("LICENSE")) {
64+
into("META-INF")
65+
}
66+
}

0 commit comments

Comments
 (0)