Files
tpeetz f0cf98d36e
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
remove asciidoctor from kontor-spring
2026-07-23 05:12:03 +02:00

50 lines
1.4 KiB
Kotlin

plugins {
id("base")
id("maven-publish")
id("de.infolektuell.typst") version "0.8.0"
}
typst.version = "v0.14.2"
typst.sourceSets {
// Sources in src/main
val main by registering {
// The files to compile (without .typ extension) in src/main/typst
documents = listOf("kontor") // src/main/typst/document.typst
inputs.put("version", version.toString())
}
}
tasks.withType<AbstractPublishToMaven>().configureEach {
dependsOn(tasks.named("compileTypst"))
}
publishing {
publications {
create<MavenPublication>("maven") {
artifactId = "kontor"
artifact(file("build/typst/main/pdf/kontor.pdf")) {
classifier = "docs"
extension = "pdf"
}
}
}
repositories {
maven {
// Determine URL based on version
url = uri(
if (version.toString().endsWith("SNAPSHOT")) {
"https://nexus.thpeetz.de/repository/maven-snapshots/"
} else {
"https://nexus.thpeetz.de/repository/maven-releases/"
}
)
// Credentials
credentials {
username = project.findProperty("nexusUsername") as String? ?: System.getenv("NEXUS_USERNAME")
password = project.findProperty("nexusPassword") as String? ?: System.getenv("NEXUS_PASSWORD")
}
}
}
}