Merge pull request #38 from mipt-npm/commandertvis/ios

Fix suffix removal for release task
This commit is contained in:
Alexander Nozik 2022-03-08 12:09:04 +03:00 committed by GitHub
commit 778e4875d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ public class KSciencePublishingExtension(public val project: Project) {
allTasks()
.filter { it.name.startsWith("publish") && it.name.endsWith("To${name.capitalize()}Repository") }
.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}")
val releaseTask = project.tasks.findByName(theName) ?: project.tasks.create(theName) {