This repository has been archived by the owner on Jun 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
68 lines (57 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
61
62
63
64
65
66
67
68
<?xml version="1.0" encoding="UTF-8" ?>
<project name="MADSCIENCE" default="build">
<property file="build.properties" />
<property environment="env" />
<property name="file.madscience" value="MADSCIENCE.jar" />
<property name="file.JarFile" value="MadScience-MC${version.minecraft}-F${version.forge}_v${version.mod.major}.${version.mod.minor}${version.mod.revis}.${env.BUILD_NUMBER}.jar" />
<target name="build">
<copy todir="${dir.development}">
<fileset dir="../Minecraft Forge Latest/" />
</copy>
<copy todir="${dir.mcp}/src/minecraft">
<fileset dir="${dir.development}src/main/java/">
<exclude name=".git/**"/>
<exclude name="**/*.xml"/>
</fileset>
<fileset dir="${dir.development}Universal-Electricity/src/main/java/">
<exclude name=".git/**"/>
<exclude name="**/*.xml"/>
</fileset>
</copy>
<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}" />
<!-- Compile -->
<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="ModContents">
<fileset dir="${dir.mcp}/reobf/minecraft">
<include name="madscience/**"/>
</fileset>
<fileset dir="${dir.development}src/main/resources">
<exclude name=".git/**"/>
<exclude name="**/*.java"/>
<exclude name="**/*.xml"/>
</fileset>
</copy>
<jar destfile="output/${file.JarFile}">
<fileset dir="ModContents" />
</jar>
<!-- OUTPUT LATEST JAR AND ZIP FILES -->
<copy todir="output" file="build.properties" />
<jar destfile="${file.madscience}">
<fileset dir="ModContents" />
</jar>
</target>
</project>