-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.xml
More file actions
101 lines (77 loc) · 2.58 KB
/
build.xml
File metadata and controls
101 lines (77 loc) · 2.58 KB
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
96
97
98
99
100
101
<?xml version="1.0" encoding="UTF-8"?>
<!--
This build requires javafx.home property, pointing to JavaFX SDK directory, e.g.:
ant -Djavafx.home=<DIR>
-->
<project default="build-all" basedir=".">
<!-- project config -->
<property name="TARGET" value="MonkeyTester" />
<property name="MAIN_CLASS" value="com.oracle.tools.fx.monkey.MonkeyTesterApp"/>
<property name="javafx.home" value="../../../build/sdk" />
<!-- libraries -->
<path id="libs">
<!--
<pathelement location="lib/gson/gson-2.9.1.jar" />
-->
</path>
<echo message="Using Java version ${ant.java.version}."/>
<target name="clean">
<delete includeEmptyDirs="true" dir="build" failonerror="false" />
<delete includeEmptyDirs="true" dir="dist" failonerror="false" />
</target>
<target name="init" depends="clean">
<mkdir dir="build" />
<mkdir dir="build/classes" />
<mkdir dir="build/jars" />
<mkdir dir="dist" />
</target>
<target name="compile" depends="init">
<javac
srcdir="src"
destdir="build/classes"
debug="true"
encoding="utf-8"
fork="true"
nowarn="true"
optimize="false"
source="25"
target="25"
includeantruntime="false"
>
<compilerarg value="-Xlint:none"/>
<compilerarg line="--module-path ${javafx.home}/lib --add-modules javafx.base,javafx.graphics,javafx.controls,javafx.media,javafx.swing,javafx.web,jfx.incubator.input,jfx.incubator.richtext"/>
<classpath refid="libs" />
</javac>
</target>
<!-- copies non-java resources -->
<target name="copy-resources" depends="init">
<copy todir="build/classes">
<fileset dir="src" excludes="**/*.java" />
</copy>
</target>
<!-- unpacks the library jars -->
<target name="unpack-jars" depends="init">
<unzip dest="build/classes">
<path refid="libs" />
</unzip>
<delete dir="build/classes/META-INF" />
</target>
<!-- builds the app jar -->
<target name="make-jar" depends="compile, copy-resources, unpack-jars">
<delete file="build/jars/${TARGET}.jar" />
<jar jarfile="build/jars/${TARGET}.jar" basedir="build/classes" filesonly="true">
<manifest>
<attribute name="Main-Class" value="${MAIN_CLASS}" />
<attribute name="Created-By" value="andy@goryachev.com" />
</manifest>
</jar>
</target>
<!-- copies jar to base dir -->
<target name="copy-jar" depends="make-jar">
<copy file="build/jars/${TARGET}.jar" todir="dist/" />
</target>
<!-- builds all -->
<target name="build-all" depends="compile, copy-resources, make-jar, copy-jar" />
<!-- alias to build-all target, to make it compatible with the rest of the apps -->
<target name="jar" depends="build-all" />
</project>