forked from mushroomhostage/Universal-Electricity
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
64 lines (49 loc) · 1.89 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
<?xml version="1.0" encoding="UTF-8" ?>
<project name="UniversalElectricity" default="build">
<property file="build.properties" />
<property environment="env" />
<property name="file.UeJar" value="UniversalElectricity_v${version.mod.major}.${version.mod.minor}.${version.mod.revis}.${env.BUILD_NUMBER}.zip" />
<target name="build">
<delete dir="DevContents" />
<delete dir="UeContents" />
<delete dir="BcContents" />
<delete dir="output" />
<delete dir="${dir.development}/forge" />
<copy todir="${dir.development}">
<fileset dir="../Minecraft Forge/" />
</copy>
<copy todir="${dir.mcp}/src/minecraft">
<fileset dir="${dir.development}src">
<exclude name=".git/**"/>
<exclude name="**/*.xml"/>
</fileset>
</copy>
<mkdir dir="DevContents" />
<mkdir dir="UeContents" />
<mkdir dir="BcContents" />
<mkdir dir="output" />
<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="cmd" osfamily="windows">
<arg line="reobfuscate_srg.bat" />
</exec>
<exec dir="${dir.mcp}" executable="bash" osfamily="unix">
<arg line="recompile.sh" />
</exec>
<exec dir="${dir.mcp}" executable="bash" osfamily="unix">
<arg line="reobfuscate_srg.sh" />
</exec>
<copy todir="UeContents">
<fileset dir="${dir.development}src" excludes=".git/**" />
</copy>
<zip destfile="output/${file.UeJar}">
<fileset dir="UeContents" />
</zip>
<copy todir="output" file="build.properties" />
</target>
</project>