Skip to content

Commit

Permalink
improve publish configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
derklaro committed Oct 19, 2022
1 parent d035653 commit e798a36
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,47 @@ subprojects {
publications.apply {
create("maven", MavenPublication::class.java).apply {
from(components.getByName("java"))

pom {
name.set(project.name)
description.set(project.description)
url.set("https://github.com/juliarn/NPC-Lib")

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

scm {
tag.set("HEAD")
url.set("[email protected]:juliarn/NPC-Lib.git")
connection.set("scm:git:[email protected]:juliarn/NPC-Lib.git")
developerConnection.set("scm:git:[email protected]:juliarn/NPC-Lib.git")
}

issueManagement {
system.set("GitHub Issues")
url.set("https://github.com/juliarn/NPC-Lib/issues")
}

ciManagement {
system.set("GitHub Actions")
url.set("https://github.com/juliarn/NPC-Lib/actions")
}

withXml {
val repositories = asNode().appendNode("repositories")
project.repositories.forEach {
if (it is MavenArtifactRepository && it.url.toString().startsWith("https://")) {
val repo = repositories.appendNode("repository")
repo.appendNode("id", it.name)
repo.appendNode("url", it.url.toString())
}
}
}
}
}
}
}
Expand Down

0 comments on commit e798a36

Please sign in to comment.