equivalent-exchange-3/build.xml

90 lines
No EOL
3.5 KiB
XML

<?xml version="1.0" ?>
<project name="Equivalent Exchange 3">
<property file="build.properties" />
<target name="clean">
<delete file="${dir.development}\mcp\src\minecraft\mcmod.info" />
<delete dir="${dir.development}\mcp\src\minecraft\com" />
<delete dir="${dir.development}\mcp\reobf\minecraft" />
</target>
<target name="build">
<copy todir="${dir.development}\mcp\src\minecraft">
<fileset dir="${dir.development}\source\Equivalent-Exchange-3\ee3_common\" />
</copy>
<replace dir="${dir.development}\mcp\src\minecraft" token="@VERSION@" value="${release.mod.version}" />
<replace dir="${dir.development}\mcp\src\minecraft" token="@FINGERPRINT@" value="${release.mod.fingerprint}" />
</target>
<target name="recompile">
<exec dir="${dir.development}\mcp" executable="cmd" os="Windows 7">
<arg line="/c recompile.bat" />
</exec>
<exec dir="${dir.development}\mcp" executable="cmd" os="Windows 8">
<arg line="/c recompile.bat" />
</exec>
<exec dir="${dir.development}\mcp" executable="bash" os="Linux">
<arg line="recompile.sh" />
</exec>
<exec dir="${dir.development}\mcp" executable="bash" os="Mac OS X">
<arg line="recompile.sh" />
</exec>
</target>
<target name="reobfuscate">
<exec dir="${dir.development}\mcp" executable="cmd" os="Windows 7">
<arg line="/c reobfuscate_srg.bat" />
</exec>
<exec dir="${dir.development}\mcp" executable="cmd" os="Windows 8">
<arg line="/c reobfuscate_srg.bat" />
</exec>
<exec dir="${dir.development}\mcp" executable="bash" os="Linux">
<arg line="reobfuscate_srg.sh" />
</exec>
<exec dir="${dir.development}\mcp" executable="bash" os="Mac OS X">
<arg line="reobfuscate_srg.sh" />
</exec>
</target>
<target name="release-shared">
<!-- Prep for the release -->
<antcall target="clean" />
<antcall target="build" />
<antcall target="recompile" />
<antcall target="reobfuscate" />
<!-- Build the jar -->
<mkdir dir="${dir.share}\${release.minecraft.version}\${release.mod.version}" />
<jar destfile="${dir.share}\${release.minecraft.version}\${release.mod.version}\ee3-universal-${release.mod.version}.jar">
<fileset dir="${dir.development}\mcp\src\common\" includes="mcmod.info" />
<fileset dir="${dir.development}\mcp\reobf\minecraft" />
<fileset dir="${dir.development}\source\Equivalent-Exchange-3\resources" />
</jar>
<!-- Clean up the MCP source now that we are done -->
<antcall target="clean" />
</target>
<target name="release">
<!-- Prep for the release -->
<antcall target="clean" />
<antcall target="build" />
<antcall target="recompile" />
<antcall target="reobfuscate" />
<!-- Build the jar -->
<mkdir dir="${dir.release}\${release.minecraft.version}\${release.mod.version}" />
<jar destfile="${dir.release}\${release.minecraft.version}\${release.mod.version}\ee3-universal-${release.mod.version}.jar">
<fileset dir="${dir.development}\mcp\src\minecraft\" includes="mcmod.info" />
<fileset dir="${dir.development}\mcp\reobf\minecraft" />
<fileset dir="${dir.development}\source\Equivalent-Exchange-3\resources" />
</jar>
<!-- Sign the jar -->
<signjar jar="${dir.release}\${release.minecraft.version}\${release.mod.version}\ee3-universal-${release.mod.version}.jar" keystore="${keystore.location}" alias="${keystore.alias}" storepass="${keystore.password}" />
<!-- Clean up the MCP source now that we are done -->
<antcall target="clean" />
</target>
</project>