forked from AKSW/RDFauthor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
111 lines (104 loc) · 5.3 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<?xml version="1.0"?>
<project name="RDFauthor" default="all" basedir=".">
<!-- Setup -->
<property name="SRC_DIR" value="src" description="Source folder" />
<property name="LIB_DIR" value="src" description="Libraries folder" />
<property name="DIST_DIR" value="dist" description="Output folder for build targets" />
<property name="DIST_NORM_DIR" value="${DIST_DIR}/js" description="Output folder for JavaScript files" />
<property name="DIST_MIN_DIR" value="${DIST_DIR}/min" description="Output folder for Minified JS files" />
<property name="YUI" value="tools/yuicompressor-2.4.2.jar" description="YUICompressor" />
<!-- Files names for distribution -->
<property name="CSS" value="${DIST_NORM_DIR}/rdfauthor.css" />
<property name="CSS_MIN" value="${DIST_MIN_DIR}/rdfauthor.min.css" />
<property name="JS" value="${DIST_NORM_DIR}/rdfauthor.js" />
<property name="JS_MIN" value="${DIST_MIN_DIR}/rdfauthor.min.js" />
<!-- Targets -->
<target name="css" description="Concatenate CSS source files">
<echo message="Building ${CSS}" />
<concat destfile="${CSS}">
<!-- rdfa -->
<fileset dir="${SRC_DIR}" includes="rdfauthor.css" />
<fileset dir="${SRC_DIR}" includes="rdfauthor_mobile.css" />
<fileset dir="${SRC_DIR}" includes="widget.date.css" />
<fileset dir="${SRC_DIR}" includes="widget.resource.css" />
<fileset dir="${SRC_DIR}" includes="widget.xmlliteral.css" />
<!-- libs -->
<fileset dir="${LIB_DIR}" includes="jquery-ui.css" />
<fileset dir="${LIB_DIR}" includes="jquery.ui.autocomplete.css" />
</concat>
<echo message="${CSS} built." />
</target>
<target name="css.min" depends="css" description="Minimize CSS files">
<echo message="Building ${CSS_MIN}" />
<apply executable="java" parallel="false" verbose="true" dest="${DIST_MIN_DIR}">
<fileset dir="${DIST_NORM_DIR}">
<include name="rdfauthor.css" />
</fileset>
<arg line="-jar" />
<arg path="${YUI}" />
<arg value="--charset" />
<arg value="UTF8" />
<arg value="-o" />
<targetfile />
<mapper type="glob" from="rdfauthor.css" to="rdfauthor.min.css" />
</apply>
<echo message="${CSS_MIN} built." />
</target>
<!-- JAVASCRIPT -->
<target name="js" description="Concatenate JavaScript source files">
<echo message="Building ${JS}" />
<concat destfile="${JS}">
<!-- rdfa core -->
<fileset dir="${SRC_DIR}" includes="rdfauthor.js" />
<fileset dir="${SRC_DIR}" includes="rdfauthor.predicaterow.js" />
<fileset dir="${SRC_DIR}" includes="rdfauthor.selector.js" />
<fileset dir="${SRC_DIR}" includes="rdfauthor.statement.js" />
<fileset dir="${SRC_DIR}" includes="rdfauthor.subjectgroup.js" />
<fileset dir="${SRC_DIR}" includes="rdfauthor.view.js" />
<!-- rdfa widgets -->
<fileset dir="${SRC_DIR}" includes="widget.alida.js" />
<fileset dir="${SRC_DIR}" includes="widget.date.js" />
<fileset dir="${SRC_DIR}" includes="widget.literal.js" />
<fileset dir="${SRC_DIR}" includes="widget.mailto.js" />
<fileset dir="${SRC_DIR}" includes="widget.meta.js" />
<fileset dir="${SRC_DIR}" includes="widget.prototype.js" />
<fileset dir="${SRC_DIR}" includes="widget.resource.js" />
<fileset dir="${SRC_DIR}" includes="widget.tel.js" />
<fileset dir="${SRC_DIR}" includes="widget.template.js" />
<fileset dir="${SRC_DIR}" includes="widget.xmlliteral.js" />
<!-- libs -->
<fileset dir="${LIB_DIR}" includes="jquery-ui.js" />
<fileset dir="${LIB_DIR}" includes="jquery.js" />
<fileset dir="${LIB_DIR}" includes="jquery.json.js" />
<fileset dir="${LIB_DIR}" includes="jquery.rdfquery.core.js" />
<fileset dir="${LIB_DIR}" includes="jquery.ui.autocomplete.js" />
<fileset dir="${LIB_DIR}" includes="jquery.ui.datepicker.js" />
<fileset dir="${LIB_DIR}" includes="nicEdit.js" />
<fileset dir="${LIB_DIR}" includes="rdfa.js" />
<fileset dir="${LIB_DIR}" includes="xhtml1-hgrddl.js" />
</concat>
<echo message="${JS} built." />
</target>
<target name="js.min" depends="js" description="Minimize JavaScript files">
<echo message="Building ${JS_MIN}" />
<apply executable="java" parallel="false" verbose="true" dest="${DIST_MIN_DIR}">
<fileset dir="${DIST_NORM_DIR}">
<include name="rdfauthor.js" />
</fileset>
<arg line="-jar" />
<arg path="${YUI}" />
<arg value="--charset" />
<arg value="UTF8" />
<arg value="-o" />
<targetfile />
<mapper type="glob" from="rdfauthor.js" to="rdfauthor.min.js" />
</apply>
<echo message="${JS_MIN} built." />
</target>
<target name="clean">
<delete dir="${DIST_DIR}/*" />
</target>
<target name="all" depends="clean, css, css.min, js, js.min">
<echo message="Build complete." />
</target>
</project>