-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
88 lines (71 loc) · 3.37 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
<project name="css-engine" default="all" basedir=".">
<!-- ****************************************************************** -->
<!-- Definitions -->
<!-- ****************************************************************** -->
<!-- version -->
<property name="version" value="2.0.0" />
<!-- projects properties -->
<property name="api.dir" value="api" />
<property name="api.name" value="css-engine-api" />
<property name="backend.swing.dir" value="backend-swing" />
<property name="backend.swing.name" value="css-engine-swing-api" />
<property name="backend.swing.test.dir" value="backend-swing-test" />
<property name="backend.swing.test.name" value="css-engine-swing-test" />
<!-- ****************************************************************** -->
<!-- Build tasks -->
<!-- ****************************************************************** -->
<target name="clean">
<delete dir="temp/" />
<mkdir dir="temp/bin/" />
</target>
<property name="dir" value="" />
<property name="name" value="" />
<target name="api" depends="clean">
<local name="dir" />
<local name="name" />
<property name="dir" value="${api.dir}" />
<property name="name" value="${api.name}" />
<copy todir="temp/src/"><fileset dir="${dir}/src/" /></copy>
<javac destdir="temp/bin/" srcdir="${dir}/src/" target="1.6" source="1.6" includeAntRuntime="false" />
<jar destfile="temp/${name}.jar" basedir="temp/bin/" />
<jar destfile="temp/${name}-sources.jar" basedir="${dir}/src/" />
<zip destfile="${name}-${version}.zip">
<fileset dir="temp" includes="${name}.jar, ${name}-sources.jar" />
</zip>
</target>
<target name="backend.swing" depends="api">
<local name="dir" />
<local name="name" />
<property name="dir" value="${backend.swing.dir}" />
<property name="name" value="${backend.swing.name}" />
<copy todir="temp/src/"><fileset dir="${dir}/src/" /></copy>
<copy todir="temp/bin/"><fileset dir="${dir}/src/" includes="**/*.png, **/*.jpg, **/*.gif"/></copy>
<javac destdir="temp/bin/" srcdir="${dir}/src/" target="1.6" source="1.6" includeAntRuntime="false" />
<jar destfile="temp/${name}.jar" basedir="temp/bin/" />
<jar destfile="temp/${name}-sources.jar" basedir="temp/src/" />
<zip destfile="${name}-${version}.zip">
<fileset dir="temp" includes="${name}.jar, ${name}-sources.jar" />
</zip>
</target>
<target name="backend.swing.test" depends="backend.swing">
<local name="dir" />
<local name="name" />
<property name="dir" value="${backend.swing.test.dir}" />
<property name="name" value="${backend.swing.test.name}" />
<copy todir="temp/bin/"><fileset dir="${dir}/src/" includes="**/*.png, **/*.jpg, **/*.gif, **/*.css"/></copy>
<javac destdir="temp/bin/" srcdir="${dir}/src/" target="1.6" source="1.6" includeAntRuntime="false"/>
<jar destfile="temp/${name}.jar" basedir="temp/bin/">
<manifest>
<attribute name="Main-Class" value="Main" />
<attribute name="Class-Path" value="${classpath}" />
</manifest>
</jar>
<zip destfile="${name}-${version}.zip">
<fileset dir="temp" includes="${name}.jar" />
</zip>
</target>
<!-- ****************************************************************** -->
<!-- Main task -->
<!-- ****************************************************************** -->
<target name="all" depends="backend.swing.test" />
</project>