Skip to content

Commit de4ef76

Browse files
author
Oleksandr Dzhychko
committed
fix(model-api-gen-gradle): delete caches before exporting the metamodel
Successive executions of the `export-languages` target resulted in outdated results. The `runMPS` task in `export-languages` created an MPS cache at `{build.mps.system.path}/cache` on the first run and reused it for the subsequent runs. The current solution deletes the directories created by a previous run of `export-languages` before running `export-languages` again.
1 parent 6e3325f commit de4ef76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

model-api-gen-gradle/src/main/kotlin/org/modelix/metamodel/gradle/GenerateAntScriptForMpsMetaModelExport.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ abstract class GenerateAntScriptForMpsMetaModelExport @Inject constructor(of: Ob
7575
<taskdef resource="jetbrains/mps/build/ant/antlib.xml" classpathref="path.mps.ant.path" />
7676
</target>
7777
78-
<target name="export-languages" depends="declare-mps-tasks">
78+
<target name="export-languages" depends="clean,declare-mps-tasks">
7979
<echo message="Running export of languages" />
8080
<runMPS solution="e52a4421-48a2-4de1-8327-d9414e799c67(org.modelix.metamodel.export)" startClass="org.modelix.metamodel.export.CommandlineExporter" startMethod="${if (exportModulesFilter.isPresent) "exportBoth" else "exportLanguages"}">
8181
<library file="${getMpsLanguagesDir().absolutePath}" />

0 commit comments

Comments
 (0)