From 341a11a5767265f24d5fc3189c1fc3a7c26095a5 Mon Sep 17 00:00:00 2001 From: HyungJu Date: Tue, 2 Apr 2024 15:22:12 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20action=20=EC=8B=A4=ED=96=89=EC=A4=91=20f?= =?UTF-8?q?lywayMigrate=20task=20env=20=EC=98=A4=EB=A5=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle.kts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index f991b58..4cf6039 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -113,14 +113,14 @@ jib { } } -flyway { - url = env.MYSQL_URL.value + "?permitMysqlScheme=true" - user = env.MYSQL_USERNAME.value - password = env.MYSQL_PASSWORD.value - locations = arrayOf("classpath:db/migration") - driver = "com.mysql.cj.jdbc.Driver" -} - tasks.withType { + enabled = env.isPresent("MYSQL_URL") + dependsOn("classes") + + url = env.fetchOrNull("MYSQL_URL") + user = env.fetchOrNull("MYSQL_USERNAME") + password = env.fetchOrNull("MYSQL_PASSWORD") + locations = arrayOf("classpath:db/migration") + driver = "com.mysql.cj.jdbc.Driver" }