This repository has been archived by the owner on Jun 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
60 lines (51 loc) · 2.19 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?xml version="1.0" ?>
<project name="${dir.modFloder}">
<property file="build.properties" />
<target name="clean">
<delete file="${dir.development}\${dir.mcp}\src\minecraft\mcmod.info" />
<delete dir="${dir.development}\${dir.mcp}\src\minecraft\${dir.modPackege}" />
<delete dir="${dir.development}\${dir.mcp}\src\minecraft\com" />
<delete dir="${dir.development}\${dir.mcp}\reobf\minecraft" />
</target>
<target name="build">
<copy todir="${dir.development}\${dir.mcp}\src\minecraft">
<fileset dir="${dir.development}\source\${dir.modFloder}\${dir.src}" />
</copy>
<copy todir="${dir.development}\${dir.mcp}\src\minecraft">
<fileset dir="${dir.development}\source\${dir.modFloder}\${dir.lib}" />
</copy>
<replace dir="${dir.development}\${dir.mcp}\src\minecraft" token="@VERSION@" value="${release.mod.majorVersion}.${release.mod.minorVersion}.${release.mod.revision}" />
</target>
<target name="recompile">
<exec dir="${dir.development}\${dir.mcp}" executable="cmd" osfamily="windows">
<arg line="/c recompile.bat" />
</exec>
<exec dir="${dir.development}\${dir.mcp}" executable="bash" osfamily="unix">
<arg line="recompile.sh" />
</exec>
</target>
<target name="reobfuscate">
<exec dir="${dir.development}\${dir.mcp}" executable="cmd" osfamily="windows">
<arg line="/c reobfuscate_srg.bat" />
</exec>
<exec dir="${dir.development}\${dir.mcp}" executable="bash" osfamily="unix">
<arg line="reobfuscate_srg.sh" />
</exec>
</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}" />
<jar destfile="${dir.release}\Cooler-Universal-${release.mod.majorVersion}.${release.mod.minorVersion}.${release.mod.revision}.jar">
<fileset dir="${dir.development}\${dir.mcp}\src\minecraft\" includes="mcmod.info" />
<fileset dir="${dir.development}\${dir.mcp}\reobf\minecraft\" />
<fileset dir="${dir.development}\source\${dir.modFloder}\resources"/>
</jar>
<!-- Clean up the mcp source now that we are done -->
<antcall target="clean" />
</target>
</project>