mirror of
https://github.com/corda/corda.git
synced 2025-06-10 03:11:44 +00:00
Added documentation and extra logging to publish tasks (#2427)
Added documentation and extra logging to publish tasks
This commit is contained in:
parent
409cdf05e0
commit
781d517761
@ -30,6 +30,10 @@ class PublishTasks implements Plugin<Project> {
|
|||||||
createConfigurations()
|
createConfigurations()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This call must come at the end of any publish block because it configures the publishing and any
|
||||||
|
* values set after this call in the DSL will not be configured properly (and will use the default value)
|
||||||
|
*/
|
||||||
void setPublishName(String publishName) {
|
void setPublishName(String publishName) {
|
||||||
project.logger.info("Changing publishing name from ${project.name} to ${publishName}")
|
project.logger.info("Changing publishing name from ${project.name} to ${publishName}")
|
||||||
this.publishName = publishName
|
this.publishName = publishName
|
||||||
@ -51,12 +55,14 @@ class PublishTasks implements Plugin<Project> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void configureMavenPublish(BintrayConfigExtension bintrayConfig) {
|
void configureMavenPublish(BintrayConfigExtension bintrayConfig) {
|
||||||
|
project.logger.info("Configuring maven publish for $publishName")
|
||||||
project.apply([plugin: 'maven-publish'])
|
project.apply([plugin: 'maven-publish'])
|
||||||
project.publishing.publications.create(publishName, MavenPublication) {
|
project.publishing.publications.create(publishName, MavenPublication) {
|
||||||
groupId project.group
|
groupId project.group
|
||||||
artifactId publishName
|
artifactId publishName
|
||||||
|
|
||||||
if (publishConfig.publishSources) {
|
if (publishConfig.publishSources) {
|
||||||
|
project.logger.info("Publishing sources for $publishName")
|
||||||
artifact project.tasks.sourceJar
|
artifact project.tasks.sourceJar
|
||||||
}
|
}
|
||||||
artifact project.tasks.javadocJar
|
artifact project.tasks.javadocJar
|
||||||
|
Loading…
x
Reference in New Issue
Block a user