74 lines
2.0 KiB
Kotlin
74 lines
2.0 KiB
Kotlin
@file:OptIn(ExperimentalKotlinGradlePluginApi::class)
|
|
|
|
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
|
|
|
plugins {
|
|
kotlin("jvm") version masterLibs.versions.kotlinVersion
|
|
`java-library`
|
|
`maven-publish`
|
|
alias(masterLibs.plugins.dokkaPlugin)
|
|
alias(masterLibs.plugins.versionPlugin)
|
|
}
|
|
|
|
group = "net.keinekekse"
|
|
version = masterLibs.versions.utilLibraryVersion.get()
|
|
description = "Kotlin Utility Library"
|
|
extra["displayname"] = "Utility Library"
|
|
extra["copyright"] = "Copyright (c) 2025 Hartmut Bauer"
|
|
|
|
repositories {
|
|
maven("https://nexus.keinekekse.net/repository/maven-public/")
|
|
}
|
|
|
|
dependencies {
|
|
implementation(masterLibs.kotlinxSerialization)
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion.set(JavaLanguageVersion.of(masterLibs.versions.javaVersion.get()))
|
|
}
|
|
withSourcesJar()
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain(masterLibs.versions.javaVersion.get().toInt())
|
|
// compilerOptions {
|
|
// languageVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_3)
|
|
// }
|
|
}
|
|
|
|
/* Generierte Dokka-Doku als javadoc.jar ausgeben (s.a. "publishing")
|
|
tasks.register<Jar>("dokkaJar") {
|
|
group = "build"
|
|
description = "Assembles a JAR containing the Dokka documentation."
|
|
dependsOn(tasks.dokkaGeneratePublicationHtml) // Ensure Dokka is generated before creating the JAR
|
|
// dependsOn(tasks.dokkaGeneratePublicationJavadoc) // Ensure Dokka is generated before creating the JAR
|
|
archiveClassifier.set("javadoc")
|
|
from(layout.buildDirectory.dir("dokka")) // Use the output directory of Dokka
|
|
}
|
|
*/
|
|
|
|
publishing {
|
|
repositories {
|
|
maven {
|
|
credentials {
|
|
username = "admin"
|
|
password = "admin123"
|
|
}
|
|
url = uri("https://nexus.keinekekse.net/repository/maven-releases/")
|
|
}
|
|
}
|
|
publications.create<MavenPublication>("maven") {
|
|
from(components["java"])
|
|
// artifact(tasks["dokkaJar"])
|
|
}
|
|
}
|
|
|
|
// ./gradlew dokkaGenerate
|
|
dokka {
|
|
dokkaPublications.html {
|
|
outputDirectory.set(project.file("docs/api"))
|
|
}
|
|
}
|