-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix maven publication to include dependencies
- Loading branch information
Showing
1 changed file
with
33 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 { | ||
|
@@ -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") | ||
} | ||
} | ||
} | ||
} | ||
|