Fix publication task dependency
This commit is contained in:
parent
c5b8c688a2
commit
e0d331d4d4
@ -35,10 +35,11 @@ class KSciencePublishingExtension(val project: Project) {
|
|||||||
project.addGithubPublishing(githubOrg, githubProject)
|
project.addGithubPublishing(githubOrg, githubProject)
|
||||||
|
|
||||||
if (publish) {
|
if (publish) {
|
||||||
val publicationTask = project.tasks.getByName("publish${project.publicationTarget}ToGithubRepository")
|
project.tasks.findByName("publish${project.publicationTarget}ToGithubRepository")?.let {publicationTask->
|
||||||
releaseTask?.dependsOn(publicationTask)
|
releaseTask?.dependsOn(publicationTask)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private val releaseTask by lazy {
|
private val releaseTask by lazy {
|
||||||
project.tasks.findByName("release")
|
project.tasks.findByName("release")
|
||||||
@ -51,10 +52,11 @@ class KSciencePublishingExtension(val project: Project) {
|
|||||||
require(initializedFlag) { "The project vcs is not set up use 'vcs' method to do so" }
|
require(initializedFlag) { "The project vcs is not set up use 'vcs' method to do so" }
|
||||||
project.addSpacePublishing(spaceRepo)
|
project.addSpacePublishing(spaceRepo)
|
||||||
if (publish) {
|
if (publish) {
|
||||||
val publicationTask = project.tasks.getByName("publish${project.publicationTarget}ToSpaceRepository")
|
project.tasks.findByName("publish${project.publicationTarget}ToSpaceRepository")?.let { publicationTask ->
|
||||||
releaseTask?.dependsOn(publicationTask)
|
releaseTask?.dependsOn(publicationTask)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// // Bintray publishing
|
// // Bintray publishing
|
||||||
// var bintrayOrg: String? by project.extra
|
// var bintrayOrg: String? by project.extra
|
||||||
@ -69,10 +71,12 @@ class KSciencePublishingExtension(val project: Project) {
|
|||||||
require(initializedFlag) { "The project vcs is not set up use 'vcs' method to do so" }
|
require(initializedFlag) { "The project vcs is not set up use 'vcs' method to do so" }
|
||||||
project.addSonatypePublishing()
|
project.addSonatypePublishing()
|
||||||
if (publish) {
|
if (publish) {
|
||||||
val publicationTask = project.tasks.getByName("publish${project.publicationTarget}ToSonatypeRepository")
|
project.tasks.findByName("publish${project.publicationTarget}ToSonatypeRepository")
|
||||||
|
?.let { publicationTask ->
|
||||||
releaseTask?.dependsOn(publicationTask)
|
releaseTask?.dependsOn(publicationTask)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user