generated from rnentjes/kotlin-server-web-empty
Upgraded Kotlin library to version 2.1.0 and updated `typed-byte-arrays` dependency to 0.2.10. Adjusted project settings to use JDK 21 (Temurin) and incremented project version to 0.3.4. Reordered Maven repository definitions for consistency.
119 lines
3.0 KiB
Kotlin
119 lines
3.0 KiB
Kotlin
plugins {
|
|
kotlin("multiplatform") version "2.1.0"
|
|
`maven-publish`
|
|
signing
|
|
id("org.jetbrains.dokka") version "1.5.31"
|
|
}
|
|
|
|
group = "nl.astraeus"
|
|
version = "0.3.4"
|
|
|
|
repositories {
|
|
maven {
|
|
url = uri("https://gitea.astraeus.nl:8443/api/packages/rnentjes/maven")
|
|
}
|
|
mavenCentral()
|
|
}
|
|
|
|
kotlin {
|
|
jvm()
|
|
js {
|
|
browser()
|
|
}
|
|
sourceSets {
|
|
val commonMain by getting {
|
|
dependencies {
|
|
api("nl.astraeus:typed-byte-arrays:0.2.10")
|
|
}
|
|
}
|
|
val commonTest by getting {
|
|
dependencies {
|
|
implementation(kotlin("test-common"))
|
|
}
|
|
}
|
|
val jvmMain by getting
|
|
val jvmTest by getting {
|
|
dependencies {
|
|
implementation(kotlin("test"))
|
|
}
|
|
}
|
|
val jsMain by getting
|
|
val jsTest by getting {
|
|
dependencies {
|
|
implementation(kotlin("test-js"))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
extra["PUBLISH_GROUP_ID"] = group
|
|
extra["PUBLISH_VERSION"] = version
|
|
extra["PUBLISH_ARTIFACT_ID"] = name
|
|
|
|
// Stub secrets to let the project sync and build without the publication values set up
|
|
val signingKeyId: String? by project
|
|
val signingPassword: String? by project
|
|
val signingSecretKeyRingFile: String? by project
|
|
|
|
extra["signing.keyId"] = signingKeyId
|
|
extra["signing.password"] = signingPassword
|
|
extra["signing.secretKeyRingFile"] = signingSecretKeyRingFile
|
|
|
|
val javadocJar by tasks.registering(Jar::class) {
|
|
archiveClassifier.set("javadoc")
|
|
}
|
|
|
|
publishing {
|
|
repositories {
|
|
maven {
|
|
name = "gitea"
|
|
setUrl("https://gitea.astraeus.nl:8443/api/packages/rnentjes/maven")
|
|
|
|
credentials {
|
|
val giteaUsername: String? by project
|
|
val giteaPassword: String? by project
|
|
|
|
username = giteaUsername
|
|
password = giteaPassword
|
|
}
|
|
}
|
|
}
|
|
|
|
// Configure all publications
|
|
publications.withType<MavenPublication> {
|
|
// Stub javadoc.jar artifact
|
|
artifact(javadocJar.get())
|
|
|
|
// Provide artifacts information requited by Maven Central
|
|
pom {
|
|
name.set("typed-byte-arrays")
|
|
description.set("Typed byte arrays")
|
|
url.set("https://gitea.astraeus.nl/rnentjes/typed-byte-arrays")
|
|
|
|
licenses {
|
|
license {
|
|
name.set("MIT")
|
|
url.set("https://opensource.org/licenses/MIT")
|
|
}
|
|
}
|
|
developers {
|
|
developer {
|
|
id.set("rnentjes")
|
|
name.set("Rien Nentjes")
|
|
email.set("info@nentjes.com")
|
|
}
|
|
}
|
|
scm {
|
|
url.set("https://gitea.astraeus.nl/rnentjes/typed-byte-arrays")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.withType<AbstractPublishToMaven> {
|
|
dependsOn(tasks.withType<Sign>())
|
|
}
|
|
|
|
signing {
|
|
sign(publishing.publications)
|
|
} |