diff --git a/buildSrc/src/main/kotlin/com/saveourtool/save/buildutils/DockerStackConfiguration.kt b/buildSrc/src/main/kotlin/com/saveourtool/save/buildutils/DockerStackConfiguration.kt index a74a42bf8f..e24c94c734 100644 --- a/buildSrc/src/main/kotlin/com/saveourtool/save/buildutils/DockerStackConfiguration.kt +++ b/buildSrc/src/main/kotlin/com/saveourtool/save/buildutils/DockerStackConfiguration.kt @@ -55,13 +55,13 @@ fun Project.registerLiquibaseTask(profile: String) { } private fun Project.registerLiquibaseTask(projectName: String, relativeChangeLogFile: String, profile: String, mustRunAfterTask: String?): TaskProvider { - val taskName = "liquibaseUpdate" + projectName.split("-").map { it.capitalized() }.joinToString("") + val taskName = getTaskName(projectName) val credentials = getDatabaseCredentials(projectName, profile) return tasks.register(taskName) { mustRunAfterTask?.let { - mustRunAfter("liquibaseUpdate" + it.split("-").map { it.capitalized() }.joinToString("")) + mustRunAfter(getTaskName(it)) } val contexts = when (profile) { @@ -91,6 +91,8 @@ private fun Project.registerLiquibaseTask(projectName: String, relativeChangeLog } } +private fun getTaskName(projectName: String) = "liquibaseUpdate" + projectName.split("-").map { it.capitalized() }.joinToString("") + /** * @param profile deployment profile, used, for example, to start SQL database in dev profile only */