Skip to content

Commit

Permalink
fix maven publication to include dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
gciatto committed Nov 20, 2021
1 parent 8ed47a3 commit d6d1d6f
Showing 1 changed file with 33 additions and 25 deletions.
58 changes: 33 additions & 25 deletions maven-publication.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ val mavenUsername: String? by project
// env ORG_GRADLE_PROJECT_mavenPassword
val mavenPassword: String? by project

val publishableClassifiers = setOf("redist", "full", "javadoc", "sources")

project.configure<PublishingExtension> {
repositories {
maven {
Expand All @@ -27,38 +29,44 @@ project.configure<PublishingExtension> {
}
}

publications.create<MavenPublication>("maven") {
groupId = project.group.toString()
version = project.version.toString()
project.afterEvaluate {
publications.create<MavenPublication>("maven") {
groupId = project.group.toString()
version = project.version.toString()

tasks.withType<Jar> {
artifact(this)
}
from(project.components.getByName("kotlin"))

pom {
name.set("Coordination -- Module `${project.name}`")
description.set("Tuple-based Coordination environment")
url.set("https://github.com/CoordaaS/TuSoW")
licenses {
license {
name.set("Apache 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0")
tasks.withType<Jar> {
if (archiveClassifier.getOrElse("") in publishableClassifiers) {
artifact(this)
}
}

developers {
developer {
name.set("Giovanni Ciatto")
email.set("[email protected]")
url.set("https://about.me/gciatto")
organization.set("University of Bologna")
organizationUrl.set("https://www.unibo.it/it")
pom {
name.set("Coordination -- Module `${project.name}`")
description.set("Tuple-based Coordination environment")
url.set("https://github.com/CoordaaS/TuSoW")
licenses {
license {
name.set("Apache 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0")
}
}
}

scm {
connection.set("scm:git:git:///github.com/CoordaaS/TuSoW.git")
url.set("https://github.com/CoordaaS/TuSoW")
developers {
developer {
name.set("Giovanni Ciatto")
email.set("[email protected]")
url.set("https://about.me/gciatto")
organization.set("University of Bologna")
organizationUrl.set("https://www.unibo.it/it")
}
}

scm {
connection.set("scm:git:git:///github.com/CoordaaS/TuSoW.git")
url.set("https://github.com/CoordaaS/TuSoW")
}
}
}
}
Expand Down

0 comments on commit d6d1d6f

Please sign in to comment.