From f74c02c1e27074f860224574994d3caaa5ce05d0 Mon Sep 17 00:00:00 2001 From: Wladimir Safonov Date: Thu, 13 Jun 2024 19:05:32 +0200 Subject: [PATCH] 1.25.2: support debug mode for runMigrations --- CHANGELOG.md | 7 +++++++ build.gradle.kts | 2 +- .../kotlin/de/itemis/mps/gradle/runmigrations/Plugin.kt | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f7b1a4..f336415 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 1.25.2 + +### Fixed + +- `runMigrations`: existing `debug` parameter is used to start migration process in debug mode (suspended and listening + on port 5005). + ## 1.25.1 ### Fixed diff --git a/build.gradle.kts b/build.gradle.kts index 6ab7604..58cbed1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -24,7 +24,7 @@ plugins { id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.13.2" } -val baseVersion = "1.25.1" +val baseVersion = "1.25.2" group = "de.itemis.mps" diff --git a/src/main/kotlin/de/itemis/mps/gradle/runmigrations/Plugin.kt b/src/main/kotlin/de/itemis/mps/gradle/runmigrations/Plugin.kt index 833e79f..d3d0190 100644 --- a/src/main/kotlin/de/itemis/mps/gradle/runmigrations/Plugin.kt +++ b/src/main/kotlin/de/itemis/mps/gradle/runmigrations/Plugin.kt @@ -131,6 +131,10 @@ open class RunMigrationsMpsProjectPlugin : Plugin { "arg"("value" to "-Xmx${extension.maxHeap}") } + if (extension.debug) { + "arg"("value" to "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005") + } + "arg"("value" to "--add-opens=java.base/java.io=ALL-UNNAMED") "arg"("value" to "--add-opens=java.base/java.lang=ALL-UNNAMED") "arg"("value" to "--add-opens=java.base/java.lang.reflect=ALL-UNNAMED")