Files
kotlin-simple-logging/build.gradle.kts
rnentjes 63625873be Add logging functionality and Maven publishing setup
Added Logger class with various log levels to `commonMain`. Integrated `maven-publish` and `signing` plugins in `build.gradle.kts` to facilitate publishing artifacts to the Maven repository with proper credentials and metadata. Removed `gradle.properties` and updated `.gitignore` accordingly.
2024-10-26 15:26:21 +02:00

76 lines
1.7 KiB
Kotlin

import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType
plugins {
kotlin("multiplatform") version "2.0.21"
`maven-publish`
signing
}
group = "nl.astraeus"
version = "1.0.0-SNAPSHOT"
repositories {
mavenCentral()
}
kotlin {
jvm {}
js {}
sourceSets {
val commonMain by getting
val jvmMain by getting
val jsMain by getting
}
}
publishing {
repositories {
maven {
name = "gitea"
setUrl("https://gitea.astraeus.nl/api/packages/rnentjes/maven")
credentials() {
val giteaUsername: kotlin.String? by project
val giteaPassword: kotlin.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-komponent")
description.set("Kotlin komponent")
url.set("https://github.com/rnentjes/komponent")
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://github.com/rnentjes/komponent")
}
}
}
}
signing {
sign(publishing.publications)
}