Fix suffix removal for release task

This commit is contained in:
Iaroslav Postovalov 2022-03-08 16:04:18 +07:00
parent acb13abc6e
commit 25c1c45818

View File

@ -57,7 +57,7 @@ public class KSciencePublishingExtension(public val project: Project) {
allTasks() allTasks()
.filter { it.name.startsWith("publish") && it.name.endsWith("To${name.capitalize()}Repository") } .filter { it.name.startsWith("publish") && it.name.endsWith("To${name.capitalize()}Repository") }
.forEach { .forEach {
val theName = "release${it.name.removePrefix("publish").removeSuffix("")}" val theName = "release${it.name.removePrefix("publish").removeSuffix("To${name.capitalize()}Repository")}"
logger.info("Making $theName task depend on ${it.name}") logger.info("Making $theName task depend on ${it.name}")
val releaseTask = project.tasks.findByName(theName) ?: project.tasks.create(theName) { val releaseTask = project.tasks.findByName(theName) ?: project.tasks.create(theName) {