-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.xml
95 lines (82 loc) · 3.86 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
<?xml version="1.0" ?>
<project name="Necromancy" default="build">
<property file="build.properties" prefix="build"/>
<property file="build_number.properties" prefix="build_number"/>
<target name="clean">
<delete file="${build.dir.development}\forge\mcp\src\minecraft\mcmod.info" />
<delete dir="${build.dir.development}\forge\mcp\src\minecraft\com\sirolf2009" />
<delete dir="${build.dir.development}\forge\mcp\reobf\minecraft" />
</target>
<target name="prep">
<copy todir="${build.dir.development}\forge\mcp\src\minecraft">
<fileset dir="${build.dir.development}\source\Necromancy\common\" />
</copy>
<copy todir="${build.dir.development}\forge\mcp\src\minecraft">
<fileset dir="${build.dir.development}\source\Necromancy\resources\" />
</copy>
<copy todir="${build.dir.development}\forge\mcp\src\minecraft">
<fileset dir="${build.dir.development}\source\NecroAPI\common\" />
</copy>
</target>
<target name="replace_tokens">
<replace dir="${build.dir.development}\forge\mcp\src\minecraft" token="@VERSION@" value="${release.mod.version}" />
<replace dir="${build.dir.development}\forge\mcp\src\minecraft" token="@FINGERPRINT@" value="${release.mod.fingerprint}" />
</target>
<target name="recompile">
<exec dir="${build.dir.development}\forge\mcp" executable="cmd" osfamily="windows">
<arg line="/c recompile.bat" />
</exec>
<exec dir="${build.dir.development}\forge\mcp" executable="bash" osfamily="unix">
<arg line="recompile.sh" />
</exec>
</target>
<target name="reobfuscate">
<exec dir="${build.dir.development}\forge\mcp" executable="cmd" osfamily="windows">
<arg line="/c reobfuscate_srg.bat" />
</exec>
<exec dir="${build.dir.development}\forge\mcp" executable="bash" osfamily="unix">
<arg line="reobfuscate_srg.sh" />
</exec>
</target>
<target name="sign_jar">
<signjar jar="${build.dir.release}\Necromancy-${release.mod.version}-${release.minecraft.version}.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="prep" />
<antcall target="recompile" />
<antcall target="reobfuscate" />
<!-- Build the jar -->
<mkdir dir="${build.dir.release}" />
<jar destfile="${build.dir.release}\Necromancy-universal-${release.mod.version}.jar">
<fileset dir="${build.dir.development}\forge\mcp\src\minecraft\" includes="mcmod.info" />
<fileset dir="${build.dir.development}\forge\mcp\reobf\minecraft" />
<fileset dir="${build.dir.development}\source\Necromancy\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 -->
<record name="log.txt" action="start"/>
<echo>Did you set the MCMod.info version?</echo>
<input message="Mod version:" addproperty="release.mod.version" />
<input message="Minecraft version:" addproperty="release.minecraft.version" />
<antcall target="clean" />
<antcall target="prep" />
<antcall target="replace_tokens" />
<antcall target="recompile" />
<antcall target="reobfuscate" />
<!-- Build the jar -->
<mkdir dir="${build.dir.release}" />
<jar destfile="${build.dir.release}\Necromancy-${release.mod.version}-${release.minecraft.version}.jar">
<fileset dir="${build.dir.development}\forge\mcp\src\minecraft\" includes="mcmod.info" />
<fileset dir="${build.dir.development}\forge\mcp\reobf\minecraft" />
<fileset dir="${build.dir.development}\source\Necromancy\resources" excludes="**/xcf/**" />
</jar>
<!-- Clean up the MCP source now that we are done -->
<antcall target="clean" />
<record name="log.txt" action="stop"/>
</target>
</project>