resonant-induction/build.xml
2013-09-21 10:39:59 +08:00

88 lines
No EOL
3 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<project name="Resonant Induction" default="build">
<property file="build.properties" />
<property environment="env" />
<property name="file.main" value="Resonant_Induction.jar" />
<property name="file.api" value="Resonant_Induction_API.zip" />
<property name="file.mainfile" value="Resonant_Induction_v${version.mod.major}.${version.mod.minor}.${version.mod.revis}.${env.BUILD_NUMBER}.jar" />
<property name="file.apifile" value="Resonant_Induction_API_v${version.mod.major}.${version.mod.minor}.${version.mod.revis}.${env.BUILD_NUMBER}.zip" />
<target name="build">
<copy todir="${dir.development}">
<fileset dir="../Minecraft Forge Latest/" />
</copy>
<get src="http://www.chickenbones.craftsaddle.org/Files/New_Versions/1.6.3/CodeChickenCore-dev%200.9.0.6.jar"
dest="${dir.mcp}/lib/CCC-dev.jar"/>
<get src="http://www.chickenbones.craftsaddle.org/Files/New_Versions/1.6.3/NotEnoughItems-dev%201.6.1.5.jar"
dest="${dir.mcp}/lib/NEI-dev.jar"/>
<get src="http://files.minecraftforge.net/ForgeMultipart/ForgeMultipart-dev-1.6.2-1.0.0.173.jar"
dest="${dir.mcp}/lib/FMP-dev.jar"/>
<copy todir="${dir.mcp}/src/minecraft">
<fileset dir="${dir.development}src">
<exclude name=".git/**"/>
<exclude name="**/*.xml"/>
</fileset>
<fileset dir="${dir.development}Modding-Library/src">
<exclude name=".git/**"/>
<exclude name="**/*.xml"/>
</fileset>
</copy>
<mkdir dir="output" />
<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="JarContents">
<fileset dir="${dir.mcp}/reobf/minecraft" excludes=".git/**" />
<fileset dir="${dir.development}resources">
<exclude name=".git/**"/>
<exclude name="**/*.java"/>
<exclude name="**/*.xml"/>
</fileset>
</copy>
<copy todir="APIContents">
<fileset dir="${dir.development}src/resonantinduction/api" excludes=".git/**" />
</copy>
<jar destfile="output/${file.mainfile}">
<fileset dir="JarContents" />
</jar>
<zip destfile="output/${file.apifile}">
<fileset dir="APIContents" />
</zip>
<copy todir="output" file="build.properties" />
<!-- OUTPUT LATEST JAR AND ZIP FILES -->
<jar destfile="${file.main}">
<fileset dir="JarContents" />
</jar>
<zip destfile="${file.api}">
<fileset dir="APIContents" />
</zip>
</target>
</project>