Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Commit

Permalink
various improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
lesclaz committed Feb 25, 2024
1 parent d78ad3f commit 3ead2a6
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 96 deletions.
54 changes: 44 additions & 10 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import cl.franciscosolis.sonatypecentralupload.SonatypeCentralUploadTask

plugins {
kotlin("jvm") version "1.9.22"
id("cl.franciscosolis.sonatype-central-upload") version "1.0.0"
`maven-publish`
id("cl.franciscosolis.sonatype-central-upload") version "1.0.2"
id("com.google.devtools.ksp").version("1.9.22-1.0.17")
}

Expand Down Expand Up @@ -40,21 +43,52 @@ kotlin {
jvmToolchain(17)
}

sonatypeCentralUpload {
publishing {
publications {
register<MavenPublication>("maven") {
pom {
name.set(project.name)
description.set("A tool designed to interact with ETECSA services.")
url.set("http://github.com/suitetecsa/nauta-connect")
licenses {
license {
name.set("MIT License")
url.set("http://github.com/suitetecsa/nauta-connect/blob/master/LICENSE")
distribution.set("repo")
}
}
developers {
developer {
id.set("lesclaz")
name.set("Lesly Cintra")
email.set("[email protected]")
}
}
scm {
url.set("http://github.com/suitetecsa/nauta-connect/tree/master")
connection.set("scm:git:git://github.com/suitetecsa/nauta-connect.git")
developerConnection.set("scm:git:ssh://github.com/suitetecsa/nauta-connect.git")
}
}
}
}
}

tasks.named<SonatypeCentralUploadTask>("sonatypeCentralUpload") {
dependsOn("jar", "sourcesJar", "javadocJar", "generatePomFileForMavenPublication")

username = System.getenv("SONATYPE_USERNAME")
password = System.getenv("SONATYPE_PASSWORD")

archives = files(
"build/libs/nauta-connect-${version}.jar",
"build/libs/nauta-connect-${version}-javadoc.jar",
"build/libs/nauta-connect-${version}-sources.jar"
tasks.named("jar"),
tasks.named("sourcesJar"),
tasks.named("javadocJar"),
)
pom = file(
tasks.named("generatePomFileForMavenPublication").get().outputs.files.single()
)
pom = file("./pom_gradle.txt")

signingKey = System.getenv("SIGNING_KEY")
signingKeyPassphrase = System.getenv("SIGNING_KEY_PASSPHRASE")
}

tasks.sonatypeCentralUpload {
dependsOn("build")
}
86 changes: 0 additions & 86 deletions pom_gradle.txt

This file was deleted.

0 comments on commit 3ead2a6

Please sign in to comment.