-
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #442 from weisJ/fix_pom
Fix configuration of pom for published artifacts
- Loading branch information
Showing
1 changed file
with
58 additions
and
56 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 |
---|---|---|
|
@@ -161,68 +161,70 @@ allprojects { | |
} | ||
} | ||
|
||
extensions.findByType(PublishingExtension::class)?.apply { | ||
if (project.path == ":") { | ||
// Skip the root project | ||
return@apply | ||
} | ||
plugins.withType<MavenPublishPlugin>().configureEach { | ||
configure<PublishingExtension> { | ||
if (project.path == ":") { | ||
// Skip the root project | ||
return@configure | ||
} | ||
|
||
val useInMemoryKey by props() | ||
if (useInMemoryKey) { | ||
apply(plugin = "signing") | ||
val useInMemoryKey by props() | ||
if (useInMemoryKey) { | ||
apply(plugin = "signing") | ||
|
||
configure<SigningExtension> { | ||
useInMemoryPgpKeys( | ||
project.stringProperty("signing.inMemoryKey"), | ||
project.stringProperty("signing.password") | ||
) | ||
configure<SigningExtension> { | ||
useInMemoryPgpKeys( | ||
project.stringProperty("signing.inMemoryKey"), | ||
project.stringProperty("signing.password") | ||
) | ||
} | ||
} | ||
} | ||
|
||
publications { | ||
withType<MavenPublication> { | ||
// Use the resolved versions in pom.xml | ||
// Gradle might have different resolution rules, so we set the versions | ||
// that were used in Gradle build/test. | ||
versionFromResolution() | ||
pom { | ||
simplifyXml() | ||
description.set(project.description!!) | ||
name.set( | ||
(project.findProperty("artifact.name") as? String) | ||
?: project.name.capitalize().replace("-", " ") | ||
) | ||
url.set("https://litiengine.com") | ||
organization { | ||
name.set("Gurkenlabs") | ||
url.set("https://gurkenlabs.de/") | ||
} | ||
issueManagement { | ||
system.set("GitHub") | ||
url.set("https://github.com/gurkenlabs/litiengine/issues") | ||
} | ||
licenses { | ||
license { | ||
name.set("MIT") | ||
url.set("https://github.com/gurkenlabs/litiengine/blob/master/LICENSE") | ||
distribution.set("repo") | ||
publications { | ||
withType<MavenPublication> { | ||
// Use the resolved versions in pom.xml | ||
// Gradle might have different resolution rules, so we set the versions | ||
// that were used in Gradle build/test. | ||
versionFromResolution() | ||
pom { | ||
simplifyXml() | ||
description.set(project.description!!) | ||
name.set( | ||
(project.findProperty("artifact.name") as? String) | ||
?: project.name.capitalize().replace("-", " ") | ||
) | ||
url.set("https://litiengine.com") | ||
organization { | ||
name.set("Gurkenlabs") | ||
url.set("https://gurkenlabs.de/") | ||
} | ||
} | ||
scm { | ||
url.set("'https://github.com/gurkenlabs/litiengine/") | ||
connection.set("scm:git:git://github.com/gurkenlabs/litiengine.git") | ||
developerConnection.set("scm:git:[email protected]:gurkenlabs/litiengine.git") | ||
} | ||
developers { | ||
developer { | ||
id.set("steffen") | ||
name.set("Steffen Wilke") | ||
email.set("[email protected]") | ||
issueManagement { | ||
system.set("GitHub") | ||
url.set("https://github.com/gurkenlabs/litiengine/issues") | ||
} | ||
licenses { | ||
license { | ||
name.set("MIT") | ||
url.set("https://github.com/gurkenlabs/litiengine/blob/master/LICENSE") | ||
distribution.set("repo") | ||
} | ||
} | ||
scm { | ||
url.set("'https://github.com/gurkenlabs/litiengine/") | ||
connection.set("scm:git:git://github.com/gurkenlabs/litiengine.git") | ||
developerConnection.set("scm:git:[email protected]:gurkenlabs/litiengine.git") | ||
} | ||
developer { | ||
id.set("matthias") | ||
name.set("Matthias Wilke") | ||
email.set("[email protected]") | ||
developers { | ||
developer { | ||
id.set("steffen") | ||
name.set("Steffen Wilke") | ||
email.set("[email protected]") | ||
} | ||
developer { | ||
id.set("matthias") | ||
name.set("Matthias Wilke") | ||
email.set("[email protected]") | ||
} | ||
} | ||
} | ||
} | ||
|