Mekanism-tilera-Edition/build.xml
2013-06-28 18:25:05 -04:00

111 lines
No EOL
3.4 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<project name="ElectricExpansion" default="build">
<property file="build.properties" />
<property environment="env" />
<property name="file.core" value="Mekanism-v${version.mod.major}.${version.mod.minor}.${version.mod.revis}.${env.BUILD_NUMBER}.jar"/>
<property name="file.generators" value="MekanismGenerators-v${version.mod.major}.${version.mod.minor}.${version.mod.revis}.${env.BUILD_NUMBER}.jar"/>
<property name="file.tools" value="MekanismTools-v${version.mod.major}.${version.mod.minor}.${version.mod.revis}.${env.BUILD_NUMBER}.jar"/>
<property name="file.mdk" value="MDK-v${version.mod.major}.${version.mod.minor}.${version.mod.revis}.${env.BUILD_NUMBER}.zip"/>
<target name="build">
<delete dir="coreContents"/>
<delete dir="generatorsContents"/>
<delete dir="toolsContents"/>
<delete dir="mdkContents"/>
<delete dir="${dir.development}/forge"/>
<copy todir="${dir.development}">
<fileset dir="../NEI/"/>
</copy>
<copy todir="${dir.mcp}/src/minecraft">
<fileset dir="${dir.development}common">
<exclude name=".git/**"/>
<exclude name="**/*.xml"/>
</fileset>
</copy>
<mkdir dir="coreContents"/>
<mkdir dir="generatorsContents"/>
<mkdir dir="toolsContents"/>
<mkdir dir="mdkContents"/>
<replace dir="${dir.mcp}/src/minecraft" token="@MAJOR@" value="${version.mod.major}"/>
<replace dir="${dir.mcp}/src/minecraft" token="@MINOR@" value="${version.mod.minor}"/>
<replace dir="${dir.mcp}/src/minecraft" token="@REVIS@" value="${version.mod.revis}"/>
<replace dir="${dir.mcp}/src/minecraft" token="@BUILD@" value="${env.BUILD_NUMBER}"/>
<exec dir="${dir.mcp}" executable="cmd" osfamily="windows">
<arg line="recompile.bat"/>
</exec>
<exec dir="${dir.mcp}" executable="cmd" osfamily="windows">
<arg line="reobfuscate_srg.bat"/>
</exec>
<exec dir="${dir.mcp}" executable="bash" osfamily="unix">
<arg line="recompile.sh"/>
</exec>
<exec dir="${dir.mcp}" executable="bash" osfamily="unix">
<arg line="reobfuscate_srg.sh"/>
</exec>
<copy todir="coreContents">
<fileset dir="${dir.mcp}/reobf/minecraft">
<exclude name="**/mekanism/generators/**"/>
<exclude name="**/mekanism/tools/**"/>
</fileset>
<fileset dir="${dir.development}resources"/>
<fileset dir="${dir.development}etc/core"/>
</copy>
<copy todir="generatorsContents">
<fileset dir="${dir.mcp}/reobf/minecraft">
<include name = "**/mekanism/generators/**"/>
</fileset>
<fileset dir="${dir.development}etc/generators"/>
</copy>
<copy todir="toolsContents">
<fileset dir="${dir.mcp}/reobf/minecraft">
<include name = "**/mekanism/tools/**"/>
</fileset>
<fileset dir="${dir.development}etc/tools"/>
</copy>
<copy todir="mdkContents">
<fileset dir="${dir.development}common">
<include name = "**/mekanism/api/**"/>
</fileset>
</copy>
<jar destfile="output/${file.core}">
<fileset dir="coreContents"/>
</jar>
<jar destfile="output/${file.generators}">
<fileset dir="generatorsContents"/>
</jar>
<jar destfile="output/${file.tools}">
<fileset dir="toolsContents"/>
</jar>
<zip destfile="output/${file.mdk}">
<fileset dir="mdkContents"/>
</zip>
<echo file="${env.JENKINS_HOME}/jobs/${env.JOB_NAME}/info.txt" append="true">
@ ${env.BUILD_NUMBER} ${version.minecraft} ${file.core} ${file.generators} ${file.tools} ${file.mdk}
</echo>
<copy todir="output" file="build.properties"/>
</target>
</project>