<project name="buildCore" default="build" basedir="../">
  <!-- Generated by MPS -->
  <property file="${ant.file.buildCore}/../buildCore.properties" />
  <property name="build.dir" location="build" />
  <property name="build.tmp" location="${build.dir}/tmp/buildCore" />
  <property name="build.layout" location="${build.dir}/artifacts/buildCore" />
  <property name="mps_home" location="${basedir}/../../../.." />
  <property name="build_langs" location="${mps_home}/languages/build" />
  <property name="MPS" value="MPS-${build.number}" />
  <property name="environment" value="env" />
  <property name="env.JAVA_HOME" value="${java.home}/.." />
  <property name="jdk.home" value="${env.JAVA_HOME}" />
  
  <path id="path.java.library.apache-collections">
    <fileset file="${build_langs}/build.jar" />
    <fileset dir="${mps_home}">
      <include name="**/*.jar" />
    </fileset>
  </path>
  
  <target name="assemble" depends="classes">
    <mkdir dir="${build.layout}/default" />
    <mkdir dir="${build.tmp}/default/release.zip" />
    <mkdir dir="${build.tmp}/default/inrelease.zip" />
    <mkdir dir="${build.tmp}/default/mps-core_dl__lbrace_ver_rbrace_.jar" />
    <mkdir dir="${build.tmp}/default/mps-core_dl__lbrace_ver_rbrace_.jar/abc" />
    <mkdir dir="${build.tmp}/default/mps-core_dl__lbrace_ver_rbrace_.jar/abc/edf" />
    <zip destfile="${build.tmp}/default/mps-core_dl__lbrace_ver_rbrace_.jar/abc/edf/aaa" />
    <jar destfile="${build.tmp}/default/inrelease.zip/mps-core${ver}.jar" duplicate="preserve">
      <fileset dir="${build.tmp}/java/out/mps-core" />
      <fileset dir="${build.tmp}/default/mps-core_dl__lbrace_ver_rbrace_.jar" />
    </jar>
    <zip destfile="${build.tmp}/default/release.zip/inrelease.zip">
      <fileset file="${mps_home}/MPS.ipr" />
      <fileset dir="${basedir}/source_gen/">
        <include name="**/*.java" />
      </fileset>
      <fileset dir="${build.tmp}/default/inrelease.zip" />
    </zip>
    <zip destfile="${build.layout}/default/release.zip">
      <zipfileset file="${mps_home}/about.txt" prefix="aaa/bbb" />
      <fileset dir="${build.tmp}/default/release.zip" />
    </zip>
    <echo file="${build.layout}/build.properties">buildCore.build.number=${build.number}${line.separator}buildCore.ver=${ver}${line.separator}buildCore.MPS=${MPS}</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.mps-core" />
  
  <target name="processResources" />
  
  <target name="classes" depends="compileJava, processResources" />
  
  <target name="test" depends="classes" />
  
  <target name="check" depends="test" />
  
  <target name="java.compile.mps-core">
    <mkdir dir="${build.tmp}/java/out/mps-core" />
    <javac destdir="${build.tmp}/java/out/mps-core" fork="true" encoding="utf8" includeantruntime="false" debug="true">
      <compilerarg value="-Xlint:none" />
      <src>
        <pathelement path="${mps_home}/core/source" />
        <pathelement path="${mps_home}/core/source_gen" />
        <pathelement path="${mps_home}/core/tests" />
      </src>
      <classpath refid="path.java.library.apache-collections" />
    </javac>
  </target>
</project>