-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not create a new maven publication, but rather update the current …
…ones
- Loading branch information
1 parent
a96d301
commit 5f20d9a
Showing
1 changed file
with
51 additions
and
57 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 |
---|---|---|
|
@@ -156,70 +156,66 @@ subprojects { | |
} | ||
} | ||
|
||
publications { | ||
create<MavenPublication>("maven") { | ||
groupId = "com.river-kt" | ||
artifactId = project.name | ||
version = "${project.version}" | ||
|
||
// artifact(tasks["jvmJar"]) | ||
publications.forEach { publication -> | ||
if (publication !is MavenPublication) { | ||
return@forEach | ||
} | ||
|
||
artifact(tasks["sourcesJar"]) { | ||
classifier = "sources" | ||
} | ||
publication.artifact(tasks["sourcesJar"]) { | ||
classifier = "sources" | ||
} | ||
|
||
artifact(tasks["javadocJar"]) { | ||
classifier = "javadoc" | ||
} | ||
publication.artifact(tasks["javadocJar"]) { | ||
classifier = "javadoc" | ||
} | ||
|
||
pom { | ||
name.set(project.name) | ||
description.set("Extensions & Enterprise Integrations for Kotlin flows.") | ||
publication.pom { | ||
name.set(project.name) | ||
description.set("Extensions & Enterprise Integrations for Kotlin flows.") | ||
|
||
url.set("https://river-kt.com") | ||
url.set("https://river-kt.com") | ||
|
||
scm { | ||
connection.set("scm:git:git:github.com/River-Kt/river.git") | ||
developerConnection.set("scm:git:ssh://github.com/River-Kt/river.git") | ||
url.set("https://github.com/River-Kt/river") | ||
} | ||
scm { | ||
connection.set("scm:git:git:github.com/River-Kt/river.git") | ||
developerConnection.set("scm:git:ssh://github.com/River-Kt/river.git") | ||
url.set("https://github.com/River-Kt/river") | ||
} | ||
|
||
licenses { | ||
license { | ||
name.set("The MIT License") | ||
url.set("https://opensource.org/license/mit/") | ||
} | ||
licenses { | ||
license { | ||
name.set("The MIT License") | ||
url.set("https://opensource.org/license/mit/") | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id.set("gabfssilva") | ||
name.set("Gabriel Francisco") | ||
email.set("[email protected]") | ||
} | ||
developers { | ||
developer { | ||
id.set("gabfssilva") | ||
name.set("Gabriel Francisco") | ||
email.set("[email protected]") | ||
} | ||
} | ||
|
||
withXml { | ||
asNode().appendNode("dependencies").apply { | ||
val dependencies = configurations.asMap["api"]?.dependencies ?: emptySet() | ||
|
||
for (dependency in dependencies) { | ||
appendNode("dependency").apply { | ||
appendNode("groupId", dependency.group) | ||
appendNode("artifactId", dependency.name) | ||
appendNode("version", dependency.version) | ||
|
||
val excludeRules = | ||
if (dependency is ModuleDependency) dependency.excludeRules | ||
else emptySet() | ||
|
||
if (excludeRules.isNotEmpty()) { | ||
appendNode("exclusions").apply { | ||
appendNode("exclusion").apply { | ||
excludeRules.forEach { excludeRule -> | ||
appendNode("groupId", excludeRule.group) | ||
appendNode("artifactId", excludeRule.module) | ||
} | ||
withXml { | ||
asNode().appendNode("dependencies").apply { | ||
val dependencies = configurations.asMap["api"]?.dependencies ?: emptySet() | ||
|
||
for (dependency in dependencies) { | ||
appendNode("dependency").apply { | ||
appendNode("groupId", dependency.group) | ||
appendNode("artifactId", dependency.name) | ||
appendNode("version", dependency.version) | ||
|
||
val excludeRules = | ||
if (dependency is ModuleDependency) dependency.excludeRules | ||
else emptySet() | ||
|
||
if (excludeRules.isNotEmpty()) { | ||
appendNode("exclusions").apply { | ||
appendNode("exclusion").apply { | ||
excludeRules.forEach { excludeRule -> | ||
appendNode("groupId", excludeRule.group) | ||
appendNode("artifactId", excludeRule.module) | ||
} | ||
} | ||
} | ||
|
@@ -246,9 +242,7 @@ subprojects { | |
|
||
signing { | ||
useInMemoryPgpKeys(signingKeyId, signingSecretKey, signingPassword) | ||
|
||
sign(publishing.publications["maven"]) | ||
sign(tasks["javadocJar"]) | ||
sign(publishing.publications) | ||
} | ||
|
||
tasks.withType<PublishToMavenRepository>().configureEach { | ||
|