This repository has been archived by the owner on Mar 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.xml
64 lines (50 loc) · 1.93 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" ?>
<project name="Emotes" default="build">
<property file="build.properties" prefix="build"/>
<target name="clean">
<delete dir="${build.dir.gradle}\build\classes\main" />
<delete dir="${build.dir.gradle}\src\main\java\vazkii" />
<delete dir="${build.dir.gradle}\src\main\java\aurelienribon" />
<delete file="${build.dir.gradle}\src\main\java\mcmod.info" />
<delete dir ="${build.dir.temp}" />
</target>
<target name="prep">
<mkdir dir="${build.dir.temp}" />
<copy todir="${build.dir.temp}">
<fileset dir="${build.dir.repo}\resources\" />
</copy>
<copy todir="${build.dir.gradle}\src\main\java">
<fileset dir="${build.dir.repo}\MODSRC\" />
</copy>
</target>
<target name="replace_tokens">
<replace dir="${build.dir.temp}" token="ANT:VERSION" value="${build.version}" />
<replace dir="${build.dir.gradle}\src\main\java" token="ANT:VERSION" value="${build.version}" />
</target>
<target name="gradle_build">
<copy todir="${build.dir.gradle}" overwrite="true">
<fileset file="${build.dir.repo}\build.gradle"/>
</copy>
<exec dir="${build.dir.gradle}" executable="cmd" osfamily="windows">
<arg line="/c gradle build" />
</exec>
<exec dir="${build.dir.gradle}" executable="gradle" osfamily="unix">
<arg value="build" />
</exec>
<move file="${build.dir.gradle}\build\libs\modid-1.0.jar" tofile="${build.dir.output}\${build.mod_name}\${build.mod_name} ${build.version}.jar" />
</target>
<target name="inject_assets">
<jar update="true" destfile="${build.dir.output}\${build.mod_name}\${build.mod_name} ${build.version}.jar">
<fileset dir="${build.dir.temp}" excludes="**/psd/**" />
</jar>
<delete dir ="${build.dir.temp}" />
</target>
<target name="build">
<antcall target="clean" />
<antcall target="prep" />
<antcall target="replace_tokens" />
<antcall target="gradle_build" />
<antcall target="inject_assets" />
<antcall target="clean" />
</target>
</project>