2019-08-23 23:26:31 +00:00
|
|
|
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
|
2021-10-26 16:21:07 +00:00
|
|
|
import com.github.benmanes.gradle.versions.updates.gradle.GradleReleaseChannel
|
2019-06-13 08:03:45 +00:00
|
|
|
import org.jetbrains.dokka.gradle.DokkaTask
|
2020-08-07 13:51:27 +00:00
|
|
|
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
|
|
|
|
import org.jetbrains.kotlin.gradle.plugin.KotlinMultiplatformPluginWrapper
|
2018-09-24 21:13:47 +00:00
|
|
|
|
2021-01-30 15:31:19 +00:00
|
|
|
val ossrhUsername: String? by project
|
|
|
|
val ossrhPassword: String? by project
|
|
|
|
|
|
|
|
val signingKeyId: String? by project // must be the last 8 digits of the key
|
|
|
|
val signingKey: String? by project
|
|
|
|
val signingPassword: String? by project
|
2019-09-27 09:25:37 +00:00
|
|
|
|
2020-02-12 14:32:53 +00:00
|
|
|
description = "A Result monad for modelling success or failure operations."
|
2019-09-27 09:25:37 +00:00
|
|
|
|
2018-09-24 21:13:47 +00:00
|
|
|
plugins {
|
2020-08-07 13:51:27 +00:00
|
|
|
base
|
2023-03-20 01:20:22 +00:00
|
|
|
alias(libs.plugins.versions)
|
2020-08-07 13:51:27 +00:00
|
|
|
|
2023-03-20 01:20:22 +00:00
|
|
|
alias(libs.plugins.kotlin.multiplatform) apply false
|
|
|
|
alias(libs.plugins.kotlin.benchmark) apply false
|
|
|
|
alias(libs.plugins.kotlin.allopen) apply false
|
|
|
|
alias(libs.plugins.dokka) apply false
|
2018-09-24 21:13:47 +00:00
|
|
|
}
|
|
|
|
|
2020-06-05 15:26:40 +00:00
|
|
|
tasks.withType<DependencyUpdatesTask> {
|
2021-10-26 16:21:07 +00:00
|
|
|
gradleReleaseChannel = GradleReleaseChannel.CURRENT.id
|
|
|
|
|
2020-06-05 15:26:40 +00:00
|
|
|
rejectVersionIf {
|
2020-08-26 18:42:18 +00:00
|
|
|
listOf("alpha", "beta", "rc", "cr", "m", "eap", "pr", "dev").any {
|
2020-06-05 15:26:40 +00:00
|
|
|
candidate.version.contains(it, ignoreCase = true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-12 23:19:50 +00:00
|
|
|
allprojects {
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
}
|
2018-09-24 21:13:47 +00:00
|
|
|
}
|
|
|
|
|
2020-08-07 13:51:27 +00:00
|
|
|
subprojects {
|
|
|
|
plugins.withType<MavenPublishPlugin> {
|
|
|
|
apply(plugin = "org.gradle.signing")
|
2020-05-11 09:41:00 +00:00
|
|
|
|
2020-08-07 13:51:27 +00:00
|
|
|
plugins.withType<KotlinMultiplatformPluginWrapper> {
|
|
|
|
apply(plugin = "org.jetbrains.dokka")
|
2019-08-23 23:26:31 +00:00
|
|
|
|
2021-10-26 11:31:27 +00:00
|
|
|
val dokkaHtml by tasks.existing(DokkaTask::class)
|
2020-06-05 15:26:40 +00:00
|
|
|
|
2020-08-07 13:51:27 +00:00
|
|
|
val javadocJar by tasks.registering(Jar::class) {
|
|
|
|
group = LifecycleBasePlugin.BUILD_GROUP
|
|
|
|
description = "Assembles a jar archive containing the Javadoc API documentation."
|
|
|
|
archiveClassifier.set("javadoc")
|
2021-10-26 11:31:27 +00:00
|
|
|
from(dokkaHtml)
|
2020-06-05 15:26:40 +00:00
|
|
|
}
|
|
|
|
|
2022-04-15 15:29:55 +00:00
|
|
|
tasks.withType<Jar> {
|
|
|
|
from(rootDir.resolve("LICENSE")) {
|
|
|
|
into("META-INF")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-07 13:51:27 +00:00
|
|
|
configure<KotlinMultiplatformExtension> {
|
2020-08-28 15:29:43 +00:00
|
|
|
explicitApi()
|
|
|
|
|
2023-04-03 11:16:37 +00:00
|
|
|
jvmToolchain(8)
|
|
|
|
|
2020-08-07 13:51:27 +00:00
|
|
|
jvm {
|
|
|
|
mavenPublication {
|
|
|
|
artifact(javadocJar.get())
|
|
|
|
}
|
2020-02-12 14:32:53 +00:00
|
|
|
}
|
2020-11-29 21:34:08 +00:00
|
|
|
|
2023-02-07 15:48:13 +00:00
|
|
|
js(IR) {
|
2020-11-29 21:34:08 +00:00
|
|
|
browser()
|
|
|
|
nodejs()
|
|
|
|
}
|
2021-02-10 15:45:16 +00:00
|
|
|
|
2021-03-25 12:22:53 +00:00
|
|
|
linuxX64()
|
2023-01-05 23:48:20 +00:00
|
|
|
|
2021-03-25 12:22:53 +00:00
|
|
|
mingwX64()
|
2023-01-05 23:48:20 +00:00
|
|
|
|
2021-03-25 12:22:53 +00:00
|
|
|
macosX64()
|
2022-02-08 15:33:02 +00:00
|
|
|
macosArm64()
|
2023-01-05 23:48:20 +00:00
|
|
|
|
|
|
|
ios()
|
|
|
|
iosArm32()
|
|
|
|
iosSimulatorArm64()
|
|
|
|
|
|
|
|
tvos()
|
|
|
|
tvosSimulatorArm64()
|
|
|
|
|
|
|
|
watchos()
|
|
|
|
watchosX86()
|
|
|
|
watchosSimulatorArm64()
|
2020-06-05 15:26:40 +00:00
|
|
|
}
|
2020-08-07 13:51:27 +00:00
|
|
|
}
|
2020-02-12 14:32:53 +00:00
|
|
|
|
2020-08-07 13:51:27 +00:00
|
|
|
configure<PublishingExtension> {
|
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
if (project.version.toString().endsWith("SNAPSHOT")) {
|
|
|
|
setUrl("https://oss.sonatype.org/content/repositories/snapshots")
|
|
|
|
} else {
|
|
|
|
setUrl("https://oss.sonatype.org/service/local/staging/deploy/maven2")
|
|
|
|
}
|
|
|
|
|
|
|
|
credentials {
|
|
|
|
username = ossrhUsername
|
|
|
|
password = ossrhPassword
|
|
|
|
}
|
2020-02-12 14:32:53 +00:00
|
|
|
}
|
2020-06-05 15:26:40 +00:00
|
|
|
}
|
2020-02-12 14:32:53 +00:00
|
|
|
|
2020-08-07 13:51:27 +00:00
|
|
|
publications.withType<MavenPublication> {
|
|
|
|
pom {
|
|
|
|
name.set(project.name)
|
|
|
|
url.set("https://github.com/michaelbull/kotlin-result")
|
|
|
|
inceptionYear.set("2017")
|
|
|
|
|
|
|
|
licenses {
|
|
|
|
license {
|
|
|
|
name.set("ISC License")
|
|
|
|
url.set("https://opensource.org/licenses/isc-license.txt")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
developers {
|
|
|
|
developer {
|
|
|
|
name.set("Michael Bull")
|
|
|
|
url.set("https://www.michael-bull.com")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
contributors {
|
|
|
|
contributor {
|
|
|
|
name.set("Kevin Herron")
|
|
|
|
url.set("https://github.com/kevinherron")
|
|
|
|
}
|
|
|
|
|
|
|
|
contributor {
|
|
|
|
name.set("Markus Padourek")
|
|
|
|
url.set("https://github.com/Globegitter")
|
|
|
|
}
|
|
|
|
|
|
|
|
contributor {
|
|
|
|
name.set("Tristan Hamilton")
|
|
|
|
url.set("https://github.com/Munzey")
|
|
|
|
}
|
2020-08-30 21:51:03 +00:00
|
|
|
|
|
|
|
contributor {
|
|
|
|
name.set("Joseph Van der Wee")
|
|
|
|
url.set("https://github.com/jvanderwee")
|
|
|
|
}
|
2021-01-30 16:43:04 +00:00
|
|
|
|
|
|
|
contributor {
|
|
|
|
name.set("Gregory Inouye")
|
|
|
|
url.set("https://github.com/gregoryinouye")
|
|
|
|
}
|
|
|
|
|
|
|
|
contributor {
|
|
|
|
name.set("Thomas Oddsund")
|
|
|
|
url.set("https://github.com/oddsund")
|
|
|
|
}
|
|
|
|
|
|
|
|
contributor {
|
|
|
|
name.set("Jan Müller")
|
|
|
|
url.set("https://github.com/DerYeger")
|
|
|
|
}
|
2021-03-29 18:58:23 +00:00
|
|
|
|
|
|
|
contributor {
|
|
|
|
name.set("avently")
|
|
|
|
url.set("https://github.com/avently")
|
|
|
|
}
|
|
|
|
|
|
|
|
contributor {
|
|
|
|
name.set("gsteckman")
|
|
|
|
url.set("https://github.com/gsteckman")
|
|
|
|
}
|
2021-06-12 15:00:44 +00:00
|
|
|
|
|
|
|
contributor {
|
|
|
|
name.set("Mathias Guelton")
|
|
|
|
url.set("https://github.com/mguelton")
|
|
|
|
}
|
|
|
|
|
|
|
|
contributor {
|
|
|
|
name.set("Jordan Bergin")
|
|
|
|
url.set("https://github.com/MrBergin")
|
|
|
|
}
|
2021-09-23 15:46:11 +00:00
|
|
|
|
|
|
|
contributor {
|
|
|
|
name.set("Pablo Gonzalez Alonso")
|
|
|
|
url.set("https://pablisco.com/")
|
|
|
|
}
|
2021-10-26 14:55:57 +00:00
|
|
|
|
|
|
|
contributor {
|
|
|
|
name.set("Joseph Cooper")
|
|
|
|
url.set("https://grodin.github.io/")
|
|
|
|
}
|
2022-01-08 12:11:39 +00:00
|
|
|
|
|
|
|
contributor {
|
|
|
|
name.set("Sebastian Kappen")
|
|
|
|
url.set("https://github.com/Nimelrian")
|
|
|
|
}
|
2022-02-21 11:26:12 +00:00
|
|
|
|
|
|
|
contributor {
|
|
|
|
name.set("Dmitry Suzdalev")
|
|
|
|
url.set("https://github.com/dimsuz")
|
|
|
|
}
|
2022-08-23 13:02:19 +00:00
|
|
|
|
|
|
|
contributor {
|
|
|
|
name.set("Berik Visschers")
|
|
|
|
url.set("https://visschers.nu/")
|
|
|
|
}
|
2023-01-05 23:48:20 +00:00
|
|
|
|
|
|
|
contributor {
|
|
|
|
name.set("Matthew Nelson")
|
|
|
|
url.set("https://matthewnelson.io/")
|
|
|
|
}
|
2023-03-20 01:20:22 +00:00
|
|
|
|
|
|
|
contributor {
|
|
|
|
name.set("Matthias Geisler")
|
|
|
|
url.set("https://github.com/bitPogo")
|
|
|
|
}
|
2023-05-09 19:29:31 +00:00
|
|
|
|
|
|
|
contributor {
|
|
|
|
name.set("Kirill Zhukov")
|
|
|
|
url.set("https://github.com/kirillzh")
|
|
|
|
}
|
2023-11-28 14:18:17 +00:00
|
|
|
|
|
|
|
contributor {
|
|
|
|
name.set("Peter Cunderlik")
|
|
|
|
url.set("https://github.com/peter-cunderlik-kmed")
|
|
|
|
}
|
|
|
|
|
|
|
|
contributor {
|
|
|
|
name.set("YuitoSato")
|
|
|
|
url.set("https://github.com/YuitoSato")
|
|
|
|
}
|
2020-08-07 13:51:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
scm {
|
|
|
|
connection.set("scm:git:https://github.com/michaelbull/kotlin-result")
|
|
|
|
developerConnection.set("scm:git:git@github.com:michaelbull/kotlin-result.git")
|
|
|
|
url.set("https://github.com/michaelbull/kotlin-result")
|
|
|
|
}
|
|
|
|
|
|
|
|
issueManagement {
|
|
|
|
system.set("GitHub")
|
|
|
|
url.set("https://github.com/michaelbull/kotlin-result/issues")
|
|
|
|
}
|
|
|
|
|
|
|
|
ciManagement {
|
|
|
|
system.set("GitHub")
|
|
|
|
url.set("https://github.com/michaelbull/kotlin-result/actions?query=workflow%3Aci")
|
|
|
|
}
|
2020-02-12 14:55:22 +00:00
|
|
|
}
|
2020-06-05 15:26:40 +00:00
|
|
|
}
|
|
|
|
|
2020-08-07 13:51:27 +00:00
|
|
|
configure<SigningExtension> {
|
2021-01-30 15:31:19 +00:00
|
|
|
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
|
2020-08-07 13:51:27 +00:00
|
|
|
sign(publications)
|
2020-02-12 14:32:53 +00:00
|
|
|
}
|
|
|
|
}
|
2018-11-01 18:39:17 +00:00
|
|
|
}
|
2018-09-24 21:13:47 +00:00
|
|
|
}
|