This repository has been archived by the owner on Mar 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
71 lines (61 loc) · 2.37 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
61
62
63
64
65
66
67
68
69
70
71
<?xml version="1.0" ?>
<!-- Totally using the EE3 build script as a base. Thanks pahimar! https://github.com/pahimar -->
<project name="BurpTech" default="build">
<property file="build.properties" prefix="build"/>
<target name="clean">
<delete file="forge\mcp\src\minecraft\mcmod.info" />
<delete dir="forge\mcp\src\minecraft\burptech" />
<delete dir="forge\mcp\src\minecraft\ic2" />
<delete dir="forge\mcp\src\minecraft\mods" />
<delete dir="forge\mcp\src\minecraft\buildcraft" />
<delete dir="forge\mcp\reobf\minecraft" />
</target>
<target name="increment_build_number">
<propertyfile file="build.properties">
<entry key="release.number" type="int" operation="+" default="1"/>
</propertyfile>
</target>
<target name="prep">
<copy todir="forge\mcp\src\minecraft">
<fileset dir="src\common\" />
<fileset dir="src\resources" includes="mcmod.info" />
</copy>
</target>
<target name="replace_tokens">
<replace dir="forge\mcp\src\minecraft" token="@VERSION@" value="${build.release.minecraft.version}.${build.release.number}" />
</target>
<target name="recompile">
<exec dir="forge\mcp" executable="cmd" osfamily="windows">
<arg line="/c recompile.bat" />
</exec>
<exec dir="forge\mcp" executable="bash" osfamily="unix">
<arg line="recompile.sh" />
</exec>
</target>
<target name="reobfuscate">
<exec dir="forge\mcp" executable="cmd" osfamily="windows">
<arg line="/c reobfuscate_srg.bat" />
</exec>
<exec dir="forge\mcp" executable="bash" osfamily="unix">
<arg line="reobfuscate_srg.sh" />
</exec>
</target>
<target name="build">
<!-- Prep for the build -->
<antcall target="clean" />
<antcall target="increment_build_number" />
<antcall target="prep" />
<antcall target="replace_tokens" />
<antcall target="recompile" />
<antcall target="reobfuscate" />
<!-- Build the jar -->
<mkdir dir="bin\${build.release.minecraft.version}\" />
<jar destfile="bin\${build.release.minecraft.version}\burptech-${build.release.minecraft.version}.${build.release.number}.jar">
<fileset dir="src\resources" excludes="**/xcf/**,mcmod.info" />
<fileset dir="forge\mcp\src\minecraft\" includes="mcmod.info" />
<fileset dir="forge\mcp\reobf\minecraft" excludes="**/invtweaks/**,**/ic2/**,**/mods/**,**/buildcraft/**" />
</jar>
<!-- Clean up the source now that we are done -->
<antcall target="clean" />
</target>
</project>