105 lines
2.4 KiB
Kotlin
105 lines
2.4 KiB
Kotlin
import com.vanniktech.maven.publish.SonatypeHost
|
|
|
|
plugins {
|
|
kotlin("jvm") version "2.1.21"
|
|
signing
|
|
id("org.jetbrains.dokka") version "2.0.0"
|
|
id("com.vanniktech.maven.publish") version "0.31.0"
|
|
}
|
|
|
|
group = "nl.astraeus"
|
|
version = "1.1.5-SNAPSHOT"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
testImplementation(kotlin("test"))
|
|
}
|
|
|
|
tasks.test {
|
|
useJUnitPlatform()
|
|
|
|
minHeapSize = "128m"
|
|
maxHeapSize = "1g"
|
|
}
|
|
|
|
val javadocJar by tasks.registering(Jar::class) {
|
|
archiveClassifier.set("javadoc")
|
|
}
|
|
|
|
val sourcesJar by tasks.registering(Jar::class) {
|
|
archiveClassifier.set("sources") // This sets the classifier to 'sources'
|
|
from(sourceSets.main.get().allSource) // Assumes you are using the 'main' source set
|
|
}
|
|
|
|
publishing {
|
|
repositories {
|
|
mavenLocal()
|
|
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
|
|
}
|
|
}
|
|
maven {
|
|
name = "gitea8443"
|
|
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
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.withType<AbstractPublishToMaven> {
|
|
dependsOn(tasks.withType<Sign>())
|
|
}
|
|
|
|
signing {
|
|
sign(publishing.publications)
|
|
}
|
|
|
|
mavenPublishing {
|
|
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
|
|
|
|
signAllPublications()
|
|
|
|
coordinates(group.toString(), name, version.toString())
|
|
|
|
pom {
|
|
name = "simple-persistence-kotlin"
|
|
description = "Simple persistence"
|
|
inceptionYear = "2024"
|
|
url = "https://gitea.astraeus.nl/rnentjes/simple-persistence-kotlin"
|
|
licenses {
|
|
license {
|
|
name = "MIT"
|
|
url = "https://opensource.org/licenses/MIT"
|
|
}
|
|
}
|
|
developers {
|
|
developer {
|
|
id = "rnentjes"
|
|
name = "Rien Nentjes"
|
|
email = "info@nentjes.com"
|
|
}
|
|
}
|
|
scm {
|
|
url = "https://gitea.astraeus.nl/rnentjes/simple-persistence-kotlin"
|
|
}
|
|
}
|
|
}
|