Skip to content

Commit

Permalink
add pom information
Browse files Browse the repository at this point in the history
  • Loading branch information
anatawa12 committed Apr 27, 2021
1 parent b9ce3cc commit 1e1ed53
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,55 @@ subprojects {
tasks.compileJava {
options.compilerArgs.add("-Xlint")
}

val maven = publishing.publications.create("maven", MavenPublication::class) {
from(project.components["java"])

pom {
name.set(base.archivesBaseName)
description.set("A asar implementation in java without runtime dependency.")
url.set("https://github.com/anatawa12/asar4j")

scm {
url.set("https://github.com/anatawa12/asar4j")
connection.set("scm:git:git://github.com/anatawa12/asar4j.git")
developerConnection.set("scm:git:[email protected]:anatawa12/asar4j.git")
}

issueManagement {
system.set("github")
url.set("https://github.com/anatawa12/asar4j/issues")
}

licenses {
license {
name.set("MIT License")
url.set("https://opensource.org/licenses/MIT")
distribution.set("repo")
}
}

developers {
developer {
id.set("anatawa12")
name.set("anatawa12")
roles.set(setOf("developer"))
}
}
}
}

publishing.repositories.maven {
name = "ossrh"
url = if (version.toString().endsWith("SNAPSHOT"))
uri("https://oss.sonatype.org/content/repositories/snapshots")
else uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")

credentials {
username = project.findProperty("com.anatawa12.sonatype.username")?.toString() ?: ""
password = project.findProperty("com.anatawa12.sonatype.passeord")?.toString() ?: ""
}
}

signing.sign(maven)
}

0 comments on commit 1e1ed53

Please sign in to comment.