Skip to content

Commit c49c8bd

Browse files
committed
feat: new method MPSRunner.run
1 parent bdec535 commit c49c8bd

File tree

1 file changed

+8
-0
lines changed
  • build-tools-lib/src/main/kotlin/org/modelix/buildtools/runner

1 file changed

+8
-0
lines changed

build-tools-lib/src/main/kotlin/org/modelix/buildtools/runner/MPSRunner.kt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ package org.modelix.buildtools.runner
22

33
import org.modelix.buildtools.BuildScriptGenerator
44
import org.modelix.buildtools.ModulesMiner
5+
import org.modelix.buildtools.ProcessExecutor
56
import org.modelix.buildtools.buildXmlString
7+
import org.modelix.buildtools.findExecutableAbsolutePath
68
import org.modelix.buildtools.newChild
79
import java.io.File
810
import java.util.Properties
@@ -100,6 +102,12 @@ class MPSRunner(
100102
generateAntScriptFile()
101103
}
102104

105+
fun run() {
106+
generateAll()
107+
val ant = ProcessExecutor()
108+
ant.exec(listOf(findExecutableAbsolutePath("ant"), "-f", getAntScriptFile().canonicalPath))
109+
}
110+
103111
private fun getMpsBuildPropertiesFile() = config.mpsHome!!.resolve("build.properties")
104112
private fun getMpsLanguagesDir() = config.mpsHome!!.resolve("languages")
105113
private fun getFileNamePrefix(): String = "runMPS_" + config.moduleId.toString().replace("-", "_")

0 commit comments

Comments
 (0)