Added publishing, upgrade kotlin version
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
plugins {
|
||||
kotlin("multiplatform") version "2.0.20-Beta2"
|
||||
id("maven-publish")
|
||||
kotlin("multiplatform") version "2.1.0"
|
||||
`maven-publish`
|
||||
signing
|
||||
}
|
||||
|
||||
group = "nl.astraeus"
|
||||
@@ -58,3 +59,75 @@ kotlin {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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("vst-ui-base")
|
||||
description.set("Vst UI base")
|
||||
url.set("https://gitea.astraeus.nl/rnentjes/vst-ui-base")
|
||||
|
||||
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/vst-ui-base")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
signing {
|
||||
sign(publishing.publications)
|
||||
}
|
||||
|
||||
tasks.withType<PublishToMavenRepository> {
|
||||
dependsOn(tasks.withType<Sign>())
|
||||
}
|
||||
Reference in New Issue
Block a user