From 403b1ae7d8ad52f824c931d051f251bc41cc4945 Mon Sep 17 00:00:00 2001
From: Sascha Lisson <sascha.lisson@itemis.de>
Date: Wed, 24 Jul 2024 13:55:24 +0200
Subject: [PATCH] fix: idea.log caused unnecessary task invalidation

The log file created by MPS was written into the working directory which
is considered an input for the runMPS task.
The path of the log directory is now outside the working directory.
---
 .../main/kotlin/org/modelix/buildtools/runner/MPSRunner.kt   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/build-tools-lib/src/main/kotlin/org/modelix/buildtools/runner/MPSRunner.kt b/build-tools-lib/src/main/kotlin/org/modelix/buildtools/runner/MPSRunner.kt
index fc28cb2..4a3ad73 100644
--- a/build-tools-lib/src/main/kotlin/org/modelix/buildtools/runner/MPSRunner.kt
+++ b/build-tools-lib/src/main/kotlin/org/modelix/buildtools/runner/MPSRunner.kt
@@ -185,13 +185,14 @@ class MPSRunner(
                     setAttribute("name", "build.dir")
                     setAttribute("location", getBuildDir().absolutePath)
                 }
+                val mpsTmpDir = getBuildDir().parentFile.resolve(getBuildDir().name + "_tmp")
                 newChild("property") {
                     setAttribute("name", "build.mps.config.path")
-                    setAttribute("location", getBuildDir().resolve("config").absolutePath)
+                    setAttribute("location", mpsTmpDir.resolve("config").absolutePath)
                 }
                 newChild("property") {
                     setAttribute("name", "build.mps.system.path")
-                    setAttribute("location", getBuildDir().resolve("system").absolutePath)
+                    setAttribute("location", mpsTmpDir.resolve("system").absolutePath)
                 }
                 newChild("property") {
                     setAttribute("name", "mps.home")