<project name="mpscore" default="build">
  <!-- Generated by MPS -->
  <property name="build.dir" location="build" />
  <property name="build.tmp" location="${build.dir}/tmp/mpscore" />
  <property name="build.layout" location="${build.dir}/artifacts/mpscore" />
  <property name="mps_home" location="${basedir}/../../MPS_HOME" />
  <property name="mps.macro.mpscore_home" location="${basedir}" />
  <property name="coderules_art" location="${basedir}/../../build/artifacts/coderules" />
  <property name="artifacts.mps" location="${mps_home}" />
  <property name="artifacts.coderules" location="${coderules_art}" />
  <property file="${artifacts.mps}/build.properties" prefix="import.mps" />
  <property file="${artifacts.coderules}/build.properties" prefix="import.coderules" />
  <property name="mps.build.number" value="${import.mps.mps.build.number}" />
  <property name="mps.date" value="${import.mps.mps.date}" />
  <property name="mps.build.vcs.number" value="${import.mps.mps.build.vcs.number}" />
  <property name="mps.teamcity.buildConfName" value="${import.mps.mps.teamcity.buildConfName}" />
  <property name="mps.idea.platform.build.number" value="${import.mps.mps.idea.platform.build.number}" />
  <property name="mps.mps.build.counter" value="${import.mps.mps.mps.build.counter}" />
  <property name="mpsBootstrapCore.version" value="${import.mps.mpsBootstrapCore.version}" />
  <property name="coderules.ci.build.num" value="${import.coderules.coderules.ci.build.num}" />
  <property name="environment" value="env" />
  <property name="env.JAVA_HOME" value="${java.home}/.." />
  <property name="jdk.home" value="${env.JAVA_HOME}" />
  <property name="mps.generator.skipUnmodifiedModels" value="false" />
  
  <path id="path.mps.ant.path">
    <pathelement location="${artifacts.mps}/lib/ant/lib/ant-mps.jar" />
    <pathelement location="${artifacts.mps}/lib/jdom.jar" />
    <pathelement location="${artifacts.mps}/lib/log4j.jar" />
  </path>
  
  <target name="assemble" depends="classes, declare-mps-tasks">
    <mkdir dir="${build.layout}/deploy" />
    <mkdir dir="${build.tmp}/default/jetbrains.mps.baseLanguageExt.jar" />
    <mkdir dir="${build.tmp}/default/jetbrains.mps.baseLanguageExt.jar/META-INF" />
    <echoxml file="${build.tmp}/default/jetbrains.mps.baseLanguageExt.jar/META-INF/module.xml">
      <module namespace="jetbrains.mps.baseLanguageExt" type="language" uuid="0fda14cc-a416-4c81-869a-2175d8b3325d">
        <dependencies>
          <module ref="6354ebe7-c22a-4a0f-ac54-50b52ab9b065(JDK)" />
          <module ref="6ed54515-acc8-4d1e-a16c-9fd6cfe951ea(MPS.Core)" />
          <module ref="1ed103c3-3aa6-49b7-9c21-6765ee11f224(MPS.Editor)" />
          <module ref="8865b7a8-5271-43d3-884c-6fd1d9cfdd34(MPS.OpenAPI)" />
          <module ref="4c6a28d1-2c60-478d-b36e-db9b3cbb21fb(closures.runtime)" />
          <module ref="9b80526e-f0bf-4992-bdf5-cee39c1833f3(collections.runtime)" />
          <module ref="a3e4657f-a76c-45bb-bbda-c764596ecc65(jetbrains.mps.baseLanguage.logging.runtime)" />
          <module ref="52b81ac7-93fd-4e9e-b972-4995882da6d4(jetbrains.mps.baseLanguage.references.runtime)" />
          <module ref="d44dab97-aaac-44cb-9745-8a14db674c03(jetbrains.mps.baseLanguage.tuples.runtime)" />
          <module ref="d936855b-48da-4812-a8a0-2bfddd633ac5(jetbrains.mps.lang.behavior.api)" />
          <module ref="d936855b-48da-4812-a8a0-2bfddd633ac4(jetbrains.mps.lang.behavior.runtime)" />
          <module ref="26e8f4ce-2a35-4f44-8065-e5ba154b18e9(jetbrains.mps.lang.coderules.runtime)" />
          <module ref="ff6372a2-2f45-4ec3-952b-02581666015f(jetbrains.mps.lang.coderules.template)" />
          <module ref="ffcd9ef5-e931-4da9-a8d1-eb9bf80d19b4(jetbrains.mps.lang.controlflow.runtime)" />
          <module ref="f486b8aa-5b2d-4ec0-8ef5-8f45d773fb84(jetbrains.mps.lang.typechecking.runtime)" />
          <module ref="a5478664-6b44-4c62-a9f7-434f8aa57eee(jetbrains.mps.logic.runtime)" />
          <module ref="da80355b-a098-4248-9ec8-70d10dd7e9af(jetbrains.mps.reporting.runtime)" />
          <module ref="9a4afe51-f114-4595-b5df-048ce3c596be(jetbrains.mps.runtime)" />
        </dependencies>
        <classpath>
          <entry path="." />
        </classpath>
        <sources jar="jetbrains.mps.baseLanguageExt-src.jar" descriptor="jetbrains.mps.baseLanguageExt.mpl" />
      </module>
    </echoxml>
    <jar destfile="${build.layout}/deploy/jetbrains.mps.baseLanguageExt.jar" duplicate="preserve">
      <fileset dir="${build.tmp}/java/out/jetbrains.mps.baseLanguageExt" />
      <fileset dir="${mps.macro.mpscore_home}/languages/jetbrains.mps.baseLanguageExt/source_gen" includes="**/trace.info, **/exports, **/*.mps, **/checkpoints" />
      <fileset dir="${build.tmp}/default/jetbrains.mps.baseLanguageExt.jar" />
    </jar>
    <copyModels todir="${build.tmp}/customProcessors/copyModels/languages-jetbrains.mps.baseLanguageExt-models">
      <fileset dir="${mps.macro.mpscore_home}/languages/jetbrains.mps.baseLanguageExt/models" includes="**/*.mps, **/*.metadata, **/*.history, **/*.mpsr, **/.model" />
    </copyModels>
    <jar destfile="${build.layout}/deploy/jetbrains.mps.baseLanguageExt-src.jar" duplicate="preserve">
      <fileset dir="${mps.macro.mpscore_home}/languages/jetbrains.mps.baseLanguageExt/source_gen">
        <exclude name="**/trace.info" />
        <exclude name="**/exports" />
        <exclude name="**/checkpoints" />
        <exclude name="**/*.mps" />
      </fileset>
      <zipfileset file="${basedir}/languages/jetbrains.mps.baseLanguageExt/jetbrains.mps.baseLanguageExt.mpl" prefix="module" />
      <zipfileset dir="${build.tmp}/customProcessors/copyModels/languages-jetbrains.mps.baseLanguageExt-models" prefix="module/models" />
    </jar>
    <mkdir dir="${build.tmp}/default/jetbrains.mps.baseLanguageExt.test.jar" />
    <mkdir dir="${build.tmp}/default/jetbrains.mps.baseLanguageExt.test.jar/META-INF" />
    <echoxml file="${build.tmp}/default/jetbrains.mps.baseLanguageExt.test.jar/META-INF/module.xml">
      <module namespace="jetbrains.mps.baseLanguageExt.test" type="solution" uuid="e44e7802-2e40-482b-9b1c-6d42660a6a11">
        <dependencies>
          <module ref="6354ebe7-c22a-4a0f-ac54-50b52ab9b065(JDK)" />
          <module ref="49808fad-9d41-4b96-83fa-9231640f6b2b(JUnit)" />
          <module ref="6ed54515-acc8-4d1e-a16c-9fd6cfe951ea(MPS.Core)" />
          <module ref="8865b7a8-5271-43d3-884c-6fd1d9cfdd34(MPS.OpenAPI)" />
          <module ref="4c6a28d1-2c60-478d-b36e-db9b3cbb21fb(closures.runtime)" />
          <module ref="9b80526e-f0bf-4992-bdf5-cee39c1833f3(collections.runtime)" />
          <module ref="52b81ac7-93fd-4e9e-b972-4995882da6d4(jetbrains.mps.baseLanguage.references.runtime)" />
          <module ref="d936855b-48da-4812-a8a0-2bfddd633ac5(jetbrains.mps.lang.behavior.api)" />
          <module ref="d936855b-48da-4812-a8a0-2bfddd633ac4(jetbrains.mps.lang.behavior.runtime)" />
          <module ref="e55e6749-03cb-4ea7-9695-2322bab791c1(jetbrains.mps.lang.test.matcher)" />
          <module ref="707c4fde-f79a-44b5-b3d7-b5cef8844ccf(jetbrains.mps.lang.test.runtime)" />
          <module ref="a5478664-6b44-4c62-a9f7-434f8aa57eee(jetbrains.mps.logic.runtime)" />
          <module ref="9a4afe51-f114-4595-b5df-048ce3c596be(jetbrains.mps.runtime)" />
        </dependencies>
        <classpath>
          <entry path="." />
        </classpath>
        <sources jar="jetbrains.mps.baseLanguageExt.test-src.jar" descriptor="jetbrains.mps.baseLanguageExt.test.msd" />
      </module>
    </echoxml>
    <jar destfile="${build.layout}/deploy/jetbrains.mps.baseLanguageExt.test.jar" duplicate="preserve">
      <fileset dir="${build.tmp}/java/out/jetbrains.mps.baseLanguageExt.test" />
      <fileset dir="${mps.macro.mpscore_home}/solutions/jetbrains.mps.baseLanguageExt.test/source_gen" includes="**/trace.info, **/exports, **/*.mps, **/checkpoints" />
      <fileset dir="${build.tmp}/default/jetbrains.mps.baseLanguageExt.test.jar" />
    </jar>
    <copyModels todir="${build.tmp}/customProcessors/copyModels/solutions-jetbrains.mps.baseLanguageExt.test-models">
      <fileset dir="${mps.macro.mpscore_home}/solutions/jetbrains.mps.baseLanguageExt.test/models" includes="**/*.mps, **/*.metadata, **/*.history, **/*.mpsr, **/.model" />
    </copyModels>
    <jar destfile="${build.layout}/deploy/jetbrains.mps.baseLanguageExt.test-src.jar" duplicate="preserve">
      <fileset dir="${mps.macro.mpscore_home}/solutions/jetbrains.mps.baseLanguageExt.test/source_gen">
        <exclude name="**/trace.info" />
        <exclude name="**/exports" />
        <exclude name="**/checkpoints" />
        <exclude name="**/*.mps" />
      </fileset>
      <zipfileset file="${basedir}/solutions/jetbrains.mps.baseLanguageExt.test/jetbrains.mps.baseLanguageExt.test.msd" prefix="module" />
      <zipfileset dir="${build.tmp}/customProcessors/copyModels/solutions-jetbrains.mps.baseLanguageExt.test-models" prefix="module/models" />
    </jar>
    <mkdir dir="${build.tmp}/default/typechecking.samples.baseLanguage.jar" />
    <mkdir dir="${build.tmp}/default/typechecking.samples.baseLanguage.jar/META-INF" />
    <echoxml file="${build.tmp}/default/typechecking.samples.baseLanguage.jar/META-INF/module.xml">
      <module namespace="typechecking.samples.baseLanguage" type="solution" uuid="3ddddf69-9ff0-426b-9365-51ae7356fb82">
        <dependencies>
          <module ref="6354ebe7-c22a-4a0f-ac54-50b52ab9b065(JDK)" />
          <module ref="49808fad-9d41-4b96-83fa-9231640f6b2b(JUnit)" />
          <module ref="6ed54515-acc8-4d1e-a16c-9fd6cfe951ea(MPS.Core)" />
          <module ref="8865b7a8-5271-43d3-884c-6fd1d9cfdd34(MPS.OpenAPI)" />
          <module ref="4c6a28d1-2c60-478d-b36e-db9b3cbb21fb(closures.runtime)" />
          <module ref="9b80526e-f0bf-4992-bdf5-cee39c1833f3(collections.runtime)" />
          <module ref="52b81ac7-93fd-4e9e-b972-4995882da6d4(jetbrains.mps.baseLanguage.references.runtime)" />
          <module ref="2d3c70e9-aab2-4870-8d8d-6036800e4103(jetbrains.mps.kernel)" />
          <module ref="d936855b-48da-4812-a8a0-2bfddd633ac5(jetbrains.mps.lang.behavior.api)" />
          <module ref="d936855b-48da-4812-a8a0-2bfddd633ac4(jetbrains.mps.lang.behavior.runtime)" />
          <module ref="d7eb0a2a-bd50-4576-beae-e4a89db35f20(jetbrains.mps.lang.scopes.runtime)" />
          <module ref="e55e6749-03cb-4ea7-9695-2322bab791c1(jetbrains.mps.lang.test.matcher)" />
          <module ref="707c4fde-f79a-44b5-b3d7-b5cef8844ccf(jetbrains.mps.lang.test.runtime)" />
          <module ref="9a4afe51-f114-4595-b5df-048ce3c596be(jetbrains.mps.runtime)" />
        </dependencies>
        <classpath>
          <entry path="." />
        </classpath>
        <sources jar="typechecking.samples.baseLanguage-src.jar" descriptor="typechecking.samples.baseLanguage.msd" />
      </module>
    </echoxml>
    <jar destfile="${build.layout}/deploy/typechecking.samples.baseLanguage.jar" duplicate="preserve">
      <fileset dir="${build.tmp}/java/out/typechecking.samples.baseLanguage" />
      <fileset dir="${mps.macro.mpscore_home}/solutions/typechecking.samples.baseLanguage/source_gen" includes="**/trace.info, **/exports, **/*.mps, **/checkpoints" />
      <fileset dir="${build.tmp}/default/typechecking.samples.baseLanguage.jar" />
    </jar>
    <copyModels todir="${build.tmp}/customProcessors/copyModels/solutions-typechecking.samples.baseLanguage-models">
      <fileset dir="${mps.macro.mpscore_home}/solutions/typechecking.samples.baseLanguage/models" includes="**/*.mps, **/*.metadata, **/*.history, **/*.mpsr, **/.model" />
    </copyModels>
    <jar destfile="${build.layout}/deploy/typechecking.samples.baseLanguage-src.jar" duplicate="preserve">
      <fileset dir="${mps.macro.mpscore_home}/solutions/typechecking.samples.baseLanguage/source_gen">
        <exclude name="**/trace.info" />
        <exclude name="**/exports" />
        <exclude name="**/checkpoints" />
        <exclude name="**/*.mps" />
      </fileset>
      <zipfileset file="${basedir}/solutions/typechecking.samples.baseLanguage/typechecking.samples.baseLanguage.msd" prefix="module" />
      <zipfileset dir="${build.tmp}/customProcessors/copyModels/solutions-typechecking.samples.baseLanguage-models" prefix="module/models" />
    </jar>
    <echo file="${build.layout}/build.properties">mps.build.number=${mps.build.number}${line.separator}mps.date=${mps.date}${line.separator}mps.build.vcs.number=${mps.build.vcs.number}${line.separator}mps.teamcity.buildConfName=${mps.teamcity.buildConfName}${line.separator}mps.idea.platform.build.number=${mps.idea.platform.build.number}${line.separator}mps.mps.build.counter=${mps.mps.build.counter}${line.separator}mpsBootstrapCore.version=${mpsBootstrapCore.version}${line.separator}coderules.ci.build.num=${coderules.ci.build.num}</echo>
  </target>
  
  <target name="buildDependents" />
  
  <target name="fetchDependencies" />
  
  <target name="build" depends="assemble" />
  
  <target name="clean">
    <delete dir="${build.tmp}" />
    <delete dir="${build.layout}" />
  </target>
  
  <target name="compileJava" depends="java.compile.jetbrains.mps.baseLanguageExt, java.compile.jetbrains.mps.baseLanguageExt.test, java.compile.typechecking.samples.baseLanguage" />
  
  <target name="processResources" />
  
  <target name="classes" depends="compileJava, processResources" />
  
  <target name="test" depends="classes, module-tests" />
  
  <target name="check" depends="test" />
  
  <target name="generate" depends="declare-mps-tasks, fetchDependencies">
    <echo message="generating" />
    <generate strictMode="true" parallelMode="true" parallelThreads="8" useInplaceTransform="false" hideWarnings="false" createStaticRefs="true" fork="true" skipUnmodifiedModels="${mps.generator.skipUnmodifiedModels}">
      <plugin path="${artifacts.mps}/plugins/mps-core/META-INF/plugin.xml/../.." />
      <plugin path="${artifacts.mps}/plugins/mps-testing" />
      <library file="${artifacts.coderules}/deploy/jetbrains.mps.coderules.jar" />
      <library file="${artifacts.coderules}/deploy/jetbrains.mps.controlflow.jar" />
      <library file="${artifacts.coderules}/deploy/jetbrains.mps.lang.coderules.jar" />
      <library file="${artifacts.coderules}/deploy/jetbrains.mps.lang.coderules.runtime.jar" />
      <library file="${artifacts.coderules}/deploy/jetbrains.mps.lang.coderules.template.jar" />
      <library file="${artifacts.coderules}/deploy/jetbrains.mps.lang.controlflow.jar" />
      <library file="${artifacts.coderules}/deploy/jetbrains.mps.lang.controlflow.runtime.jar" />
      <library file="${artifacts.coderules}/deploy/jetbrains.mps.lang.smodel.types.jar" />
      <library file="${artifacts.coderules}/deploy/jetbrains.mps.lang.typechecking.jar" />
      <library file="${artifacts.coderules}/deploy/jetbrains.mps.lang.typechecking.runtime.jar" />
      <library file="${artifacts.coderules}/deploy/jetbrains.mps.logic.jar" />
      <library file="${artifacts.coderules}/deploy/jetbrains.mps.logic.reactor.jar" />
      <library file="${artifacts.coderules}/deploy/jetbrains.mps.logic.runtime.jar" />
      <library file="${artifacts.coderules}/deploy/jetbrains.mps.logic.test.jar" />
      <library file="${artifacts.coderules}/deploy/jetbrains.mps.reporting.runtime.jar" />
      <library file="${artifacts.coderules}/deploy/jetbrains.mps.typechecking.annotation.jar" />
      <library file="${artifacts.coderules}/deploy/jetbrains.mps.typechecking.jar" />
      <library file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.blTypes.jar" />
      <library file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.checkedDots.jar" />
      <library file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.classifiers.jar" />
      <library file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.closures.jar" />
      <library file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.collections.jar" />
      <library file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.extensionMethods.jar" />
      <library file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.jar" />
      <library file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.javadoc.jar" />
      <library file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.jdk7.jar" />
      <library file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.logging.jar" />
      <library file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.logging.runtime.jar" />
      <library file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.regexp.jar" />
      <library file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.regexp.runtime.jar" />
      <library file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.scopes.jar" />
      <library file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.tuples.jar" />
      <library file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguageInternal.jar" />
      <library file="${artifacts.mps}/languages/devkits/jetbrains.mps.devkit.aspect.constraints.jar" />
      <library file="${artifacts.mps}/languages/devkits/jetbrains.mps.devkit.aspect.structure.jar" />
      <library file="${artifacts.mps}/languages/devkits/jetbrains.mps.devkit.aspect.typesystem.jar" />
      <library file="${artifacts.mps}/languages/devkits/jetbrains.mps.devkit.general-purpose.jar" />
      <library file="${artifacts.mps}/languages/devkits/jetbrains.mps.devkit.language-descriptor.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.baseLanguage.lightweightdsl.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.access.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.actions.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.aspect.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.behavior.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.checkedName.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.constraints.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.core.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.dataFlow.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.descriptor.aspects.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.descriptor.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.editor.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.findUsages.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.generator.generationContext.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.generator.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.intentions.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.migration.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.migration.runtime.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.modelapi.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.pattern.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.plugin.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.project.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.quotation.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.refactoring.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.resources.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.scopes.runtime.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.script.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.sharedConcepts.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.smodel.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.smodel.query.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.structure.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.textGen.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.traceable.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.typesystem.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.util.order.jar" />
      <library file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.refactoring.participant.jar" />
      <library file="${artifacts.mps}/languages/text/jetbrains.mps.lang.text.jar" />
      <library file="${artifacts.mps}/languages/xml/jetbrains.mps.core.xml.jar" />
      <library file="${artifacts.mps}/lib/mps-behavior-api.jar" />
      <library file="${artifacts.mps}/lib/mps-behavior-runtime.jar" />
      <library file="${artifacts.mps}/lib/mps-closures.jar" />
      <library file="${artifacts.mps}/lib/mps-collections.jar" />
      <library file="${artifacts.mps}/lib/mps-core.jar" />
      <library file="${artifacts.mps}/lib/mps-editor.jar" />
      <library file="${artifacts.mps}/lib/mps-environment.jar" />
      <library file="${artifacts.mps}/lib/mps-openapi.jar" />
      <library file="${artifacts.mps}/lib/mps-platform.jar" />
      <library file="${artifacts.mps}/lib/mps-references.jar" />
      <library file="${artifacts.mps}/lib/mps-stubs.jar" />
      <library file="${artifacts.mps}/lib/mps-test.jar" />
      <library file="${artifacts.mps}/lib/mps-tool.jar" />
      <library file="${artifacts.mps}/lib/mps-tuples.jar" />
      <library file="${artifacts.mps}/plugins/mps-testing/languages/baseLanguage/jetbrains.mps.baseLanguage.unitTest.jar" />
      <library file="${artifacts.mps}/plugins/mps-testing/languages/languageDesign/jetbrains.mps.lang.test.jar" />
      <library file="${artifacts.mps}/plugins/mps-testing/languages/languageDesign/jetbrains.mps.lang.test.matcher.jar" />
      <library file="${artifacts.mps}/plugins/mps-testing/languages/languageDesign/jetbrains.mps.lang.test.runtime.jar" />
      <chunk>
        <module file="${basedir}/languages/jetbrains.mps.baseLanguageExt/jetbrains.mps.baseLanguageExt.mpl" />
        <module file="${basedir}/solutions/jetbrains.mps.baseLanguageExt.test/jetbrains.mps.baseLanguageExt.test.msd" />
      </chunk>
      <chunk>
        <module file="${basedir}/solutions/typechecking.samples.baseLanguage/typechecking.samples.baseLanguage.msd" />
      </chunk>
      <jvmargs>
        <arg value="-Xmx512m" />
      </jvmargs>
      <macro name="mps_home" path="${mps_home}" />
      <macro name="mps.macro.mpscore_home" path="${mps.macro.mpscore_home}" />
      <macro name="coderules_art" path="${coderules_art}" />
    </generate>
  </target>
  
  <target name="declare-mps-tasks">
    <taskdef resource="jetbrains/mps/build/ant/antlib.xml" classpathref="path.mps.ant.path" />
  </target>
  
  <target name="makeDependents" />
  
  <target name="module-tests" depends="assemble, test.testconfig" />
  
  <target name="java.compile.jetbrains.mps.baseLanguageExt" depends="fetchDependencies">
    <mkdir dir="${mps.macro.mpscore_home}/languages/jetbrains.mps.baseLanguageExt/source_gen" />
    <mkdir dir="${build.tmp}/java/out/jetbrains.mps.baseLanguageExt" />
    <javac destdir="${build.tmp}/java/out/jetbrains.mps.baseLanguageExt" fork="true" encoding="utf8" includeantruntime="false" debug="true">
      <compilerarg value="-Xlint:none" />
      <src>
        <path location="${mps.macro.mpscore_home}/languages/jetbrains.mps.baseLanguageExt/source_gen" />
      </src>
      <classpath>
        <fileset file="${artifacts.mps}/lib/mps-behavior-api.jar" />
        <fileset file="${artifacts.mps}/lib/mps-behavior-runtime.jar" />
        <fileset file="${artifacts.mps}/lib/mps-closures.jar" />
        <fileset file="${artifacts.mps}/lib/mps-collections.jar" />
        <fileset file="${artifacts.mps}/lib/mps-annotations.jar" />
        <fileset file="${artifacts.mps}/lib/mps-openapi.jar" />
        <fileset file="${artifacts.mps}/lib/mps-core.jar" />
        <fileset file="${artifacts.mps}/lib/mps-logging.jar" />
        <fileset file="${artifacts.mps}/lib/mps-tuples.jar" />
        <fileset file="${artifacts.mps}/lib/mps-references.jar" />
        <fileset file="${artifacts.mps}/lib/mps-messaging.jar" />
        <fileset file="${artifacts.mps}/lib/mps-boot-util.jar" />
        <fileset file="${artifacts.mps}/lib/mps-editor.jar" />
        <fileset file="${artifacts.mps}/lib/mps-editor-api.jar" />
        <fileset file="${artifacts.mps}/lib/mps-editor-runtime.jar" />
        <fileset file="${artifacts.mps}/lib/mps-platform.jar" />
        <fileset file="${artifacts.mps}/lib/mps-environment.jar" />
        <fileset file="${artifacts.mps}/lib/annotations.jar" />
        <fileset file="${artifacts.mps}/lib/log4j.jar" />
        <fileset file="${artifacts.mps}/lib/jdom.jar" />
        <fileset file="${artifacts.mps}/lib/trove4j.jar" />
        <fileset file="${artifacts.mps}/lib/ecj-4.7.2.jar" />
        <fileset dir="${artifacts.mps}/lib" includes="*.jar" />
        <fileset file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.jar" />
        <fileset file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.closures.jar" />
        <fileset file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.collections.jar" />
        <fileset file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.logging.runtime.jar" />
        <fileset file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.scopes.jar" />
        <fileset file="${artifacts.coderules}/deploy/jetbrains.mps.coderules.jar" />
        <fileset file="${artifacts.coderules}/deploy/jetbrains.mps.controlflow.jar" />
        <fileset file="${artifacts.coderules}/deploy/jetbrains.mps.lang.coderules.runtime.jar" />
        <fileset file="${artifacts.coderules}/deploy/jetbrains.mps.lang.coderules.template.jar" />
        <fileset file="${artifacts.coderules}/deploy/jetbrains.mps.lang.controlflow.runtime.jar" />
        <fileset file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.core.jar" />
        <fileset file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.descriptor.aspects.jar" />
        <fileset file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.modelapi.jar" />
        <fileset file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.smodel.jar" />
        <fileset file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.structure.jar" />
        <fileset file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.traceable.jar" />
        <fileset file="${artifacts.coderules}/deploy/jetbrains.mps.lang.typechecking.runtime.jar" />
        <fileset file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.typesystem.jar" />
        <fileset file="${artifacts.coderules}/deploy/jetbrains.mps.logic.runtime.jar" />
        <fileset file="${artifacts.coderules}/deploy/jetbrains.mps.reporting.runtime.jar" />
        <fileset file="${artifacts.coderules}/deploy/jetbrains.mps.typechecking.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="reactive-streams-1.0.0.final.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="rxjava-2.1.1.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="rxjava2-swing-0.2.1.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="collection-0.7.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="trove4j-3.0.3.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="kotlin-runtime-1.2.30.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="kotlin-stdlib-1.2.30.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="conreactor-api-0.9.2.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="conreactor-core-0.9.2.jar" />
      </classpath>
    </javac>
  </target>
  
  <target name="java.compile.jetbrains.mps.baseLanguageExt.test" depends="java.compile.jetbrains.mps.baseLanguageExt, fetchDependencies">
    <mkdir dir="${mps.macro.mpscore_home}/solutions/jetbrains.mps.baseLanguageExt.test/source_gen" />
    <mkdir dir="${build.tmp}/java/out/jetbrains.mps.baseLanguageExt.test" />
    <javac destdir="${build.tmp}/java/out/jetbrains.mps.baseLanguageExt.test" fork="true" encoding="utf8" includeantruntime="false" debug="true">
      <compilerarg value="-Xlint:none" />
      <src>
        <path location="${mps.macro.mpscore_home}/solutions/jetbrains.mps.baseLanguageExt.test/source_gen" />
        <pathelement path="${mps.macro.mpscore_home}/solutions/jetbrains.mps.baseLanguageExt.test/test_gen/" />
      </src>
      <classpath>
        <fileset file="${artifacts.mps}/lib/mps-behavior-api.jar" />
        <fileset file="${artifacts.mps}/lib/mps-behavior-runtime.jar" />
        <fileset file="${artifacts.mps}/lib/mps-closures.jar" />
        <fileset file="${artifacts.mps}/lib/mps-collections.jar" />
        <fileset file="${artifacts.mps}/lib/mps-annotations.jar" />
        <fileset file="${artifacts.mps}/lib/mps-openapi.jar" />
        <fileset file="${artifacts.mps}/lib/mps-core.jar" />
        <fileset file="${artifacts.mps}/lib/mps-logging.jar" />
        <fileset file="${artifacts.mps}/lib/mps-tuples.jar" />
        <fileset file="${artifacts.mps}/lib/mps-references.jar" />
        <fileset file="${artifacts.mps}/lib/mps-messaging.jar" />
        <fileset file="${artifacts.mps}/lib/mps-boot-util.jar" />
        <fileset file="${artifacts.mps}/lib/mps-editor.jar" />
        <fileset file="${artifacts.mps}/lib/mps-editor-api.jar" />
        <fileset file="${artifacts.mps}/lib/mps-editor-runtime.jar" />
        <fileset file="${artifacts.mps}/lib/mps-platform.jar" />
        <fileset file="${artifacts.mps}/lib/mps-environment.jar" />
        <pathelement path="${build.tmp}/java/out/jetbrains.mps.baseLanguageExt" />
        <fileset file="${artifacts.mps}/lib/mps-test.jar" />
        <fileset file="${artifacts.mps}/lib/ant/lib/ant.jar" />
        <fileset file="${artifacts.mps}/lib/hamcrest-core-1.3.jar" />
        <fileset file="${artifacts.mps}/lib/junit-4.12.jar" />
        <fileset file="${artifacts.mps}/lib/annotations.jar" />
        <fileset file="${artifacts.mps}/lib/log4j.jar" />
        <fileset file="${artifacts.mps}/lib/jdom.jar" />
        <fileset file="${artifacts.mps}/lib/trove4j.jar" />
        <fileset file="${artifacts.mps}/lib/ecj-4.7.2.jar" />
        <fileset dir="${artifacts.mps}/lib" includes="*.jar" />
        <fileset file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.jar" />
        <fileset file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.classifiers.jar" />
        <fileset file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.scopes.jar" />
        <fileset file="${artifacts.mps}/plugins/mps-testing/languages/baseLanguage/jetbrains.mps.baseLanguage.unitTest.jar" />
        <fileset file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguageInternal.jar" />
        <fileset file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.core.jar" />
        <fileset file="${artifacts.mps}/plugins/mps-testing/languages/languageDesign/jetbrains.mps.lang.test.jar" />
        <fileset file="${artifacts.mps}/plugins/mps-testing/languages/languageDesign/jetbrains.mps.lang.test.matcher.jar" />
        <fileset file="${artifacts.mps}/plugins/mps-testing/languages/languageDesign/jetbrains.mps.lang.test.runtime.jar" />
        <fileset file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.traceable.jar" />
        <fileset file="${artifacts.coderules}/deploy/jetbrains.mps.logic.runtime.jar" />
        <fileset file="${artifacts.coderules}/deploy/jetbrains.mps.logic.test.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="collection-0.7.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="trove4j-3.0.3.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="kotlin-runtime-1.2.30.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="kotlin-stdlib-1.2.30.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="conreactor-api-0.9.2.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="conreactor-core-0.9.2.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="mockito-core-2.0.3-beta.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="objenesis-2.1.jar" />
      </classpath>
    </javac>
  </target>
  
  <target name="java.compile.typechecking.samples.baseLanguage" depends="fetchDependencies">
    <mkdir dir="${mps.macro.mpscore_home}/solutions/typechecking.samples.baseLanguage/source_gen" />
    <mkdir dir="${build.tmp}/java/out/typechecking.samples.baseLanguage" />
    <javac destdir="${build.tmp}/java/out/typechecking.samples.baseLanguage" fork="true" encoding="utf8" includeantruntime="false" debug="true">
      <compilerarg value="-Xlint:none" />
      <src>
        <path location="${mps.macro.mpscore_home}/solutions/typechecking.samples.baseLanguage/source_gen" />
        <pathelement path="${mps.macro.mpscore_home}/solutions/typechecking.samples.baseLanguage/test_gen/" />
      </src>
      <classpath>
        <fileset file="${artifacts.mps}/lib/mps-behavior-api.jar" />
        <fileset file="${artifacts.mps}/lib/mps-behavior-runtime.jar" />
        <fileset file="${artifacts.mps}/lib/mps-closures.jar" />
        <fileset file="${artifacts.mps}/lib/mps-collections.jar" />
        <fileset file="${artifacts.mps}/lib/mps-annotations.jar" />
        <fileset file="${artifacts.mps}/lib/mps-openapi.jar" />
        <fileset file="${artifacts.mps}/lib/mps-core.jar" />
        <fileset file="${artifacts.mps}/lib/mps-logging.jar" />
        <fileset file="${artifacts.mps}/lib/mps-tuples.jar" />
        <fileset file="${artifacts.mps}/lib/mps-references.jar" />
        <fileset file="${artifacts.mps}/lib/mps-messaging.jar" />
        <fileset file="${artifacts.mps}/lib/mps-boot-util.jar" />
        <fileset file="${artifacts.mps}/lib/mps-editor.jar" />
        <fileset file="${artifacts.mps}/lib/mps-editor-api.jar" />
        <fileset file="${artifacts.mps}/lib/mps-editor-runtime.jar" />
        <fileset file="${artifacts.mps}/lib/mps-environment.jar" />
        <fileset file="${artifacts.mps}/lib/mps-platform.jar" />
        <fileset file="${artifacts.mps}/lib/mps-test.jar" />
        <fileset file="${artifacts.mps}/lib/ant/lib/ant.jar" />
        <fileset file="${artifacts.mps}/lib/hamcrest-core-1.3.jar" />
        <fileset file="${artifacts.mps}/lib/junit-4.12.jar" />
        <fileset file="${artifacts.mps}/lib/annotations.jar" />
        <fileset file="${artifacts.mps}/lib/log4j.jar" />
        <fileset file="${artifacts.mps}/lib/jdom.jar" />
        <fileset file="${artifacts.mps}/lib/trove4j.jar" />
        <fileset file="${artifacts.mps}/lib/ecj-4.7.2.jar" />
        <fileset dir="${artifacts.mps}/lib" includes="*.jar" />
        <fileset file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.jar" />
        <fileset file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.classifiers.jar" />
        <fileset file="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.scopes.jar" />
        <fileset file="${artifacts.mps}/plugins/mps-testing/languages/baseLanguage/jetbrains.mps.baseLanguage.unitTest.jar" />
        <fileset file="${artifacts.coderules}/deploy/jetbrains.mps.coderules.jar" />
        <fileset file="${artifacts.coderules}/deploy/jetbrains.mps.lang.coderules.runtime.jar" />
        <fileset file="${artifacts.coderules}/deploy/jetbrains.mps.lang.coderules.template.jar" />
        <fileset file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.core.jar" />
        <fileset file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.scopes.runtime.jar" />
        <fileset file="${artifacts.mps}/plugins/mps-testing/languages/languageDesign/jetbrains.mps.lang.test.jar" />
        <fileset file="${artifacts.mps}/plugins/mps-testing/languages/languageDesign/jetbrains.mps.lang.test.matcher.jar" />
        <fileset file="${artifacts.mps}/plugins/mps-testing/languages/languageDesign/jetbrains.mps.lang.test.runtime.jar" />
        <fileset file="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.traceable.jar" />
        <fileset file="${artifacts.coderules}/deploy/jetbrains.mps.lang.typechecking.runtime.jar" />
        <fileset file="${artifacts.coderules}/deploy/jetbrains.mps.logic.runtime.jar" />
        <fileset file="${artifacts.coderules}/deploy/jetbrains.mps.reporting.runtime.jar" />
        <fileset file="${artifacts.coderules}/deploy/jetbrains.mps.typechecking.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="reactive-streams-1.0.0.final.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="rxjava-2.1.1.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="rxjava2-swing-0.2.1.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="collection-0.7.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="trove4j-3.0.3.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="kotlin-runtime-1.2.30.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="kotlin-stdlib-1.2.30.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="conreactor-api-0.9.2.jar" />
        <fileset dir="${artifacts.coderules}/deploy/lib" includes="conreactor-core-0.9.2.jar" />
      </classpath>
    </javac>
  </target>
  
  <target name="test.testconfig" depends="assemble">
    <path id="mps.libraries.path">
      <pathelement location="${artifacts.coderules}/deploy/jetbrains.mps.coderules.jar" />
      <pathelement location="${artifacts.coderules}/deploy/jetbrains.mps.controlflow.jar" />
      <pathelement location="${artifacts.coderules}/deploy/jetbrains.mps.lang.coderules.jar" />
      <pathelement location="${artifacts.coderules}/deploy/jetbrains.mps.lang.coderules.runtime.jar" />
      <pathelement location="${artifacts.coderules}/deploy/jetbrains.mps.lang.coderules.template.jar" />
      <pathelement location="${artifacts.coderules}/deploy/jetbrains.mps.lang.controlflow.jar" />
      <pathelement location="${artifacts.coderules}/deploy/jetbrains.mps.lang.controlflow.runtime.jar" />
      <pathelement location="${artifacts.coderules}/deploy/jetbrains.mps.lang.smodel.types.jar" />
      <pathelement location="${artifacts.coderules}/deploy/jetbrains.mps.lang.typechecking.jar" />
      <pathelement location="${artifacts.coderules}/deploy/jetbrains.mps.lang.typechecking.runtime.jar" />
      <pathelement location="${artifacts.coderules}/deploy/jetbrains.mps.logic.jar" />
      <pathelement location="${artifacts.coderules}/deploy/jetbrains.mps.logic.reactor.jar" />
      <pathelement location="${artifacts.coderules}/deploy/jetbrains.mps.logic.runtime.jar" />
      <pathelement location="${artifacts.coderules}/deploy/jetbrains.mps.logic.test.jar" />
      <pathelement location="${artifacts.coderules}/deploy/jetbrains.mps.reporting.runtime.jar" />
      <pathelement location="${artifacts.coderules}/deploy/jetbrains.mps.typechecking.annotation.jar" />
      <pathelement location="${artifacts.coderules}/deploy/jetbrains.mps.typechecking.jar" />
      <pathelement location="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.blTypes.jar" />
      <pathelement location="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.checkedDots.jar" />
      <pathelement location="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.classifiers.jar" />
      <pathelement location="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.closures.jar" />
      <pathelement location="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.collections.jar" />
      <pathelement location="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.jar" />
      <pathelement location="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.javadoc.jar" />
      <pathelement location="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.jdk7.jar" />
      <pathelement location="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.logging.jar" />
      <pathelement location="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.logging.runtime.jar" />
      <pathelement location="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.regexp.jar" />
      <pathelement location="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.regexp.runtime.jar" />
      <pathelement location="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.scopes.jar" />
      <pathelement location="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguage.tuples.jar" />
      <pathelement location="${artifacts.mps}/languages/baseLanguage/jetbrains.mps.baseLanguageInternal.jar" />
      <pathelement location="${artifacts.mps}/languages/devkits/jetbrains.mps.devkit.aspect.constraints.jar" />
      <pathelement location="${artifacts.mps}/languages/devkits/jetbrains.mps.devkit.aspect.structure.jar" />
      <pathelement location="${artifacts.mps}/languages/devkits/jetbrains.mps.devkit.aspect.typesystem.jar" />
      <pathelement location="${artifacts.mps}/languages/devkits/jetbrains.mps.devkit.general-purpose.jar" />
      <pathelement location="${artifacts.mps}/languages/devkits/jetbrains.mps.devkit.language-descriptor.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.baseLanguage.lightweightdsl.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.access.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.actions.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.behavior.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.checkedName.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.constraints.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.core.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.dataFlow.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.descriptor.aspects.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.descriptor.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.editor.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.findUsages.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.generator.generationContext.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.generator.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.intentions.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.migration.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.migration.runtime.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.modelapi.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.pattern.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.plugin.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.project.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.quotation.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.refactoring.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.resources.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.scopes.runtime.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.script.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.sharedConcepts.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.smodel.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.smodel.query.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.structure.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.textGen.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.traceable.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.lang.typesystem.jar" />
      <pathelement location="${artifacts.mps}/languages/languageDesign/jetbrains.mps.refactoring.participant.jar" />
      <pathelement location="${artifacts.mps}/languages/text/jetbrains.mps.lang.text.jar" />
      <pathelement location="${artifacts.mps}/lib/mps-behavior-api.jar" />
      <pathelement location="${artifacts.mps}/lib/mps-behavior-runtime.jar" />
      <pathelement location="${artifacts.mps}/lib/mps-closures.jar" />
      <pathelement location="${artifacts.mps}/lib/mps-collections.jar" />
      <pathelement location="${artifacts.mps}/lib/mps-core.jar" />
      <pathelement location="${artifacts.mps}/lib/mps-editor.jar" />
      <pathelement location="${artifacts.mps}/lib/mps-environment.jar" />
      <pathelement location="${artifacts.mps}/lib/mps-openapi.jar" />
      <pathelement location="${artifacts.mps}/lib/mps-platform.jar" />
      <pathelement location="${artifacts.mps}/lib/mps-references.jar" />
      <pathelement location="${artifacts.mps}/lib/mps-stubs.jar" />
      <pathelement location="${artifacts.mps}/lib/mps-test.jar" />
      <pathelement location="${artifacts.mps}/lib/mps-tool.jar" />
      <pathelement location="${artifacts.mps}/lib/mps-tuples.jar" />
      <pathelement location="${artifacts.mps}/plugins/mps-testing/languages/baseLanguage/jetbrains.mps.baseLanguage.unitTest.jar" />
      <pathelement location="${artifacts.mps}/plugins/mps-testing/languages/languageDesign/jetbrains.mps.lang.test.jar" />
      <pathelement location="${artifacts.mps}/plugins/mps-testing/languages/languageDesign/jetbrains.mps.lang.test.matcher.jar" />
      <pathelement location="${artifacts.mps}/plugins/mps-testing/languages/languageDesign/jetbrains.mps.lang.test.runtime.jar" />
    </path>
    <pathconvert pathsep="${path.separator}" property="mps.libraries.path.string" refid="mps.libraries.path" />
    <path id="mps.plugins.path">
      <pathelement location="${artifacts.mps}/plugins/mps-core/META-INF/plugin.xml/../.." />
      <pathelement location="${artifacts.mps}/plugins/mps-testing" />
    </path>
    <pathconvert pathsep="${path.separator}" property="mps.plugins.path.string" refid="mps.plugins.path" />
    <path id="mps.tests.path">
      <pathelement location="${build.layout}/deploy/jetbrains.mps.baseLanguageExt.jar" />
      <pathelement location="${build.layout}/deploy/jetbrains.mps.baseLanguageExt.test.jar" />
      <pathelement location="${build.layout}/deploy/typechecking.samples.baseLanguage.jar" />
    </path>
    <pathconvert pathsep="${path.separator}" property="mps.tests.path.string" refid="mps.tests.path" />
    <patternset id="plugin.deployed.jars">
      <include name="lib/**/*.jar" />
      <include name="languages/**/*.jar" />
      <exclude name="**/*-src.jar" />
    </patternset>
    <path id="long.class.path">
      <fileset dir="${artifacts.mps}/plugins/mps-core/META-INF/plugin.xml/../..">
        <patternset refid="plugin.deployed.jars" />
      </fileset>
      <fileset dir="${artifacts.mps}/plugins/mps-testing">
        <patternset refid="plugin.deployed.jars" />
      </fileset>
      <fileset dir="${artifacts.mps}/lib">
        <include name="**/*.jar" />
      </fileset>
      <pathelement path="${jdk.home}/lib/tools.jar" />
    </path>
    <pathconvert pathsep=" " targetos="unix" property="manifest.classpath">
      <path refid="long.class.path" />
      <chainedmapper>
        <filtermapper>
          <replacestring from=" " to="%20" />
        </filtermapper>
        <globmapper from="*" to="file:///*" />
      </chainedmapper>
    </pathconvert>
    <jar jarfile="${build.tmp}/mps.class.path.jar">
      <manifest>
        <attribute name="Class-Path" value="${manifest.classpath}" />
      </manifest>
    </jar>
    <junit showoutput="true" fork="true" haltonfailure="false" dir="${basedir}">
      <jvmarg value="-ea" />
      <jvmarg value="-Xss2048k" />
      <jvmarg value="-Xmx1024m" />
      <jvmarg value="-XX:MaxPermSize=256m" />
      <jvmarg value="-XX:+HeapDumpOnOutOfMemoryError" />
      
      <classpath>
        <fileset dir="${build.tmp}">
          <include name="mps.class.path.jar" />
        </fileset>
      </classpath>
      
      <env key="NO_FS_ROOTS_ACCESS_CHECK" value="true" />
      <sysproperty key="plugin.path" value="${mps.plugins.path.string}" />
      <sysproperty key="mps.libraries" value="${mps.libraries.path.string}" />
      <sysproperty key="mps.test.modules" value="${mps.tests.path.string}" />
      
      <sysproperty key="mps.macro.mpscore_home" value="${basedir}" />
      
      <test name="jetbrains.mps.testbench.junit.suites.AntModuleTestSuite" outfile="TEST-jetbrains.mps.testbench.junit.suites.AntModuleTestSuite-testconfig" />
      <formatter type="xml" />
    </junit>
  </target>
  
  <target name="cleanSources">
    <delete dir="${mps.macro.mpscore_home}/languages/jetbrains.mps.baseLanguageExt/source_gen" />
    <delete dir="${mps.macro.mpscore_home}/solutions/jetbrains.mps.baseLanguageExt.test/source_gen" />
    <delete dir="${mps.macro.mpscore_home}/solutions/typechecking.samples.baseLanguage/source_gen" />
    <delete dir="${mps.macro.mpscore_home}/solutions/jetbrains.mps.baseLanguageExt.test/test_gen" />
    <delete dir="${mps.macro.mpscore_home}/solutions/typechecking.samples.baseLanguage/test_gen" />
  </target>
</project>