Files
kotlin-simple-logging/build.gradle.kts
rnentjes bf4217ea61 Fix caller stack trace depth and update version
Adjusted the caller stack trace depth to accurately capture the caller method. Updated Gradle build version from 1.1.0 to 1.1.1 to reflect the changes. Improved logging level representation by using 'label' instead of 'name'.
2024-10-27 15:35:29 +01:00

101 lines
2.5 KiB
Kotlin

import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType
plugins {
kotlin("multiplatform") version "2.0.21"
`maven-publish`
signing
id("org.jetbrains.dokka") version "1.5.31"
}
group = "nl.astraeus"
version = "1.1.1"
repositories {
mavenCentral()
}
kotlin {
jvm {
withJava()
}
js {
browser {}
}
sourceSets {
val commonMain by getting
val jvmMain by getting
val jsMain by getting
}
}
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/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("kotlin-simple-logging")
description.set("Kotlin simple logging")
url.set("https://gitea.astraeus.nl/rnentjes/kotlin-simple-logging")
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/kotlin-simple-logging.git")
}
}
}
}
signing {
sign(publishing.publications)
}
tasks.withType<PublishToMavenRepository> {
dependsOn(tasks.withType<Sign>())
}