From 0fe2fda52a2887f57e2314d687bc335afaaaf252 Mon Sep 17 00:00:00 2001 From: "Raphael J. Sandor" <45048465+R-Sandor@users.noreply.github.com> Date: Fri, 3 Oct 2025 11:18:25 -0400 Subject: [PATCH] fix issues build.gradle profiles --- server/build.gradle | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/server/build.gradle b/server/build.gradle index a933ac93..b0c4e294 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -165,7 +165,7 @@ def setFlywayDev(dbScripts) { } def isDevProfile(String profile) { - return profile == null || profile.equalsIgnoreCase("integration") || profiles.equalsIgnoreCase("dev"); + profile in ["integration", "dev", "test", "local"] } def addDevScriptsToMigrations(dbScripts) { @@ -175,9 +175,23 @@ def addDevScriptsToMigrations(dbScripts) { def setFlywayPrefrences(profiles, dbScripts) { if(profiles != null) { + def ListOfProfiles = [] boolean isList = profiles instanceof List; + boolean isStr = profiles instanceof String; + + if(isList) { + ListOfProfiles = profiles + } + + // string of profiles delimated by a comma. + if(isStr) { + ListOfProfiles = profiles.split(','); + isList = ListOfProfiles.size() > 1; + } + if (isList) { - for(String prof in profiles) { + for(String prof in ListOfProfiles) { + println(prof) if(isDevProfile(prof)) { setFlywayDev(dbScripts); break;