From 48a19a73e125806dd0bcb0c4c982d7e5141934e0 Mon Sep 17 00:00:00 2001 From: Emil Gabrovski Date: Mon, 27 Mar 2023 10:49:23 +0300 Subject: [PATCH 1/3] CORE-12019 Add a "stopAndCleanCorda" gradle task that will Stop Corda5 if running and do some cleanup --- buildSrc/src/main/groovy/csde.gradle | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/buildSrc/src/main/groovy/csde.gradle b/buildSrc/src/main/groovy/csde.gradle index a94ffa9..574617e 100644 --- a/buildSrc/src/main/groovy/csde.gradle +++ b/buildSrc/src/main/groovy/csde.gradle @@ -148,6 +148,18 @@ tasks.register("stopCorda") { } } +tasks.register("stopAndCleanCorda") { + group = cordaGroup + dependsOn('clean') + doLast { + try { + cordaLifeCycle.stopCorda() + } catch (Exception ignored) { + } + delete devEnvWorkspace + } +} + tasks.register("getPostgresJDBC") { group = supportingGroup doLast { From 2ea1a213bc7caf26b51b6e9034be6de12427e71b Mon Sep 17 00:00:00 2001 From: Emil Gabrovski Date: Mon, 27 Mar 2023 17:07:30 +0300 Subject: [PATCH 2/3] CORE-12019 Fix PR comments --- buildSrc/src/main/groovy/csde.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/groovy/csde.gradle b/buildSrc/src/main/groovy/csde.gradle index 574617e..2b5369d 100644 --- a/buildSrc/src/main/groovy/csde.gradle +++ b/buildSrc/src/main/groovy/csde.gradle @@ -154,7 +154,8 @@ tasks.register("stopAndCleanCorda") { doLast { try { cordaLifeCycle.stopCorda() - } catch (Exception ignored) { + } catch (Exception ignore) { + println(ignore.toString()) } delete devEnvWorkspace } From 53b164ef20a2df10fdb099a504eb2a4a3e4ad91f Mon Sep 17 00:00:00 2001 From: Emil Gabrovski Date: Tue, 28 Mar 2023 12:25:40 +0300 Subject: [PATCH 3/3] CORE-12019 Fix PR comments --- buildSrc/src/main/groovy/csde.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/groovy/csde.gradle b/buildSrc/src/main/groovy/csde.gradle index 2b5369d..7d9fbc6 100644 --- a/buildSrc/src/main/groovy/csde.gradle +++ b/buildSrc/src/main/groovy/csde.gradle @@ -155,7 +155,7 @@ tasks.register("stopAndCleanCorda") { try { cordaLifeCycle.stopCorda() } catch (Exception ignore) { - println(ignore.toString()) + println("ignoring exception: ${ignore.toString()}") } delete devEnvWorkspace }