From 49cd15b60fe83dffa41fb744d52c0c042a285ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergej=20Ko=C5=A1=C4=8Dejev?= Date: Tue, 24 Oct 2023 23:10:04 +0200 Subject: [PATCH] Reset javaLauncher that was set by the backendLauncher --- src/main/kotlin/de/itemis/mps/gradle/generate/Plugin.kt | 4 ++++ src/main/kotlin/de/itemis/mps/gradle/modelcheck/Plugin.kt | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/main/kotlin/de/itemis/mps/gradle/generate/Plugin.kt b/src/main/kotlin/de/itemis/mps/gradle/generate/Plugin.kt index eacb8d0..80e9419 100644 --- a/src/main/kotlin/de/itemis/mps/gradle/generate/Plugin.kt +++ b/src/main/kotlin/de/itemis/mps/gradle/generate/Plugin.kt @@ -68,6 +68,10 @@ open class GenerateMpsProjectPlugin : Plugin { generate.configure { val backendLauncher: MpsBackendLauncher = project.objects.newInstance(MpsBackendLauncher::class) backendLauncher.configureJavaForMpsVersion(this, mpsLocation, mpsVersion) + + // For backwards compatibility reset the javaLauncher set by the backendLauncher + javaLauncher.set(null) + dependsOn(fake) argumentProviders.add(argsFromBaseExtension(extension)) diff --git a/src/main/kotlin/de/itemis/mps/gradle/modelcheck/Plugin.kt b/src/main/kotlin/de/itemis/mps/gradle/modelcheck/Plugin.kt index df2173b..bf157d8 100644 --- a/src/main/kotlin/de/itemis/mps/gradle/modelcheck/Plugin.kt +++ b/src/main/kotlin/de/itemis/mps/gradle/modelcheck/Plugin.kt @@ -54,6 +54,10 @@ open class ModelcheckMpsProjectPlugin : Plugin { checkmodels.configure { val backendLauncher: MpsBackendLauncher = project.objects.newInstance(MpsBackendLauncher::class) backendLauncher.configureJavaForMpsVersion(this, mpsLocation, mpsVersion) + + // For backwards compatibility reset the javaLauncher set by the backendLauncher + javaLauncher.set(null) + dependsOn(resolveMps) argumentProviders.add(argsFromBaseExtension(extension))