resonant-induction/build.xml
2013-12-31 12:24:50 +08:00

99 lines
3.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/" />
</copy>
<get src="http://files.minecraftforge.net/CodeChickenLib/CodeChickenLib-dev-1.6.4-1.0.0.49.jar"
dest="${dir.mcp}/lib/CCL-dev.jar"/>
<get src="http://files.minecraftforge.net/ForgeMultipart/ForgeMultipart-dev-1.6.4-1.0.0.231.jar"
dest="${dir.mcp}/lib/FMP-dev.jar"/>
<copy todir="${dir.mcp}/src/minecraft">
<fileset dir="${dir.development}src/main/java/">
<exclude name=".git/**"/>
<exclude name="**/*.xml"/>
</fileset>
<fileset dir="${dir.development}Calclavia-Core/src/main/java/">
<exclude name=".git/**"/>
<exclude name="**/*.xml"/>
</fileset>
<fileset dir="${dir.development}Universal-Electricity/src/main/java/">
<exclude name=".git/**"/>
<exclude name="**/*.xml"/>
</fileset>
</copy>
<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="bash" osfamily="unix">
<arg line="recompile.sh" />
</exec>
<unzip src="${dir.mcp}/lib/FMP-dev.jar"
dest="${dir.mcp}/bin/minecraft">
<patternset>
<include name="codechicken/**"/>
</patternset>
</unzip>
<exec dir="${dir.mcp}" executable="cmd" osfamily="windows">
<arg line="reobfuscate_srg.bat" />
</exec>
<exec dir="${dir.mcp}" executable="bash" osfamily="unix">
<arg line="reobfuscate_srg.sh" />
</exec>
<copy todir="ModContents">
<fileset dir="${dir.mcp}/reobf/minecraft">
<include name="resonantinduction/**"/>
</fileset>
<!-- Copy all resources -->
<fileset dir="${dir.development}src/main/resources">
<exclude name=".git/**"/>
<exclude name="**/*.java"/>
<exclude name="**/*.xml"/>
</fileset>
</copy>
<copy todir="APIContents">
<fileset dir="${dir.development}src/main/java/resonantinduction/api" excludes=".git/**" />
</copy>
<jar destfile="output/${file.mainfile}">
<fileset dir="ModContents" />
</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="ModContents" />
</jar>
<!--
<zip destfile="${file.api}">
<fileset dir="APIContents" />
</zip>-->
</target>
</project>