-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
97 lines (81 loc) · 3.94 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?xml version="1.0" ?>
<project name="LetsMod Mod" default="build">
<property file="build.properties" prefix="build"/>
<property file="build_number.properties" prefix="build_number"/>
<target name="clean">
<delete file="${agent.work.dir}\mc\minecraft_dev\mcp_162\src\minecraft\mcmod.info" />
<delete dir="${agent.work.dir}\mc\minecraft_dev\mcp_162\src\minecraft\com\fr3gu" />
<delete dir="${agent.work.dir}\mc\minecraft_dev\mcp_162\reobf\minecraft" />
</target>
<target name="increment_build_number">
<propertyfile file="build_number.properties">
<entry key="build_number" type="int" operation="+" default="1"/>
</propertyfile>
</target>
<target name="prep">
<copy todir="${agent.work.dir}\mc\minecraft_dev\mcp_162\src\minecraft">
<fileset dir="${agent.work.dir}\mc\minecraft_dev\source\LetsMod_Mod\letsmod_common\" />
</copy>
</target>
<target name="replace_tokens">
<replace dir="${agent.work.dir}\mc\minecraft_dev\mcp_162\src\minecraft" token="@VERSION@" value="${build.release.mod.version}" />
<replace dir="${agent.work.dir}\mc\minecraft_dev\mcp_162\src\minecraft" token="@FINGERPRINT@" value="${build.release.mod.fingerprint}" />
<replace dir="${agent.work.dir}\mc\minecraft_dev\mcp_162\src\minecraft" token="@BUILD_NUMBER@" value="${build.number}" />
</target>
<target name="recompile">
<exec dir="${agent.work.dir}\mc\minecraft_dev\mcp_162" executable="cmd" osfamily="windows">
<arg line="/c recompile.bat" />
</exec>
<exec dir="${agent.work.dir}\mc\minecraft_dev\mcp_162" executable="bash" osfamily="unix">
<arg line="recompile.sh" />
</exec>
</target>
<target name="reobfuscate">
<exec dir="${agent.work.dir}\mc\minecraft_dev\mcp_162" executable="cmd" osfamily="windows">
<arg line="/c reobfuscate_srg.bat" />
</exec>
<exec dir="${agent.work.dir}\mc\minecraft_dev\mcp_162" executable="bash" osfamily="unix">
<arg line="reobfuscate_srg.sh" />
</exec>
</target>
<!--<target name="sign_jar">
<signjar jar="${agent.work.dir}\mc\minecraft_dev\release\1.6.2\0.0.1\lmm-universal-0.0.1-${build.number}.jar" keystore="${build.keystore.location}" alias="${build.keystore.alias}" storepass="${build.keystore.password}" />
</target>-->
<target name="build">
<!-- Prep for the build -->
<antcall target="clean" />
<antcall target="increment_build_number" />
<antcall target="prep" />
<antcall target="recompile" />
<antcall target="reobfuscate" />
<!-- Build the jar -->
<mkdir dir="${agent.work.dir}\mc\minecraft_dev\release\1.6.2\0.0.1" />
<jar destfile="${agent.work.dir}\mc\minecraft_dev\release\1.6.2\0.0.1\lmm-universal-0.0.1-${build.number}.jar">
<fileset dir="${agent.work.dir}\mc\minecraft_dev\mcp_162\src\minecraft\" includes="mcmod.info" />
<fileset dir="${agent.work.dir}\mc\minecraft_dev\mcp_162\reobf\minecraft" />
<fileset dir="${agent.work.dir}\mc\minecraft_dev\source\LetsMod_Mod\resources" excludes="**/xcf/**" />
</jar>
<!-- Clean up the MCP source now that we are done -->
<antcall target="clean" />
</target>
<target name="release">
<!-- 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="${agent.work.dir}\mc\minecraft_dev\release\1.6.2\0.0.1" />
<jar destfile="${agent.work.dir}\mc\minecraft_dev\release\1.6.2\0.0.1\lmm-universal-0.0.1-${build_number.build_number}.jar">
<fileset dir="${agent.work.dir}\mc\minecraft_dev\mcp_162\src\minecraft\" includes="mcmod.info" />
<fileset dir="${agent.work.dir}\mc\minecraft_dev\mcp_162\reobf\minecraft" />
<fileset dir="${agent.work.dir}\mc\minecraft_dev\source\LetsMod_Mod\resources" excludes="**/xcf/**" />
</jar>
<!-- Sign the finished jar -->
<antcall target="sign_jar" />
<!-- Clean up the MCP source now that we are done -->
<antcall target="clean" />
</target>
</project>