forked from eXist-db/eXide
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
94 lines (94 loc) · 3.94 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
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="all" name="eXide">
<property name="src" value="./src"/>
<property name="tools" value="./tools"/>
<property name="build" value="./build"/>
<property name="scripts" value="./resources/scripts"/>
<property name="ace" value="${scripts}/ace"/>
<property name="ace.src" value="./support/ace"/>
<property name="top.dir" value="../.."/>
<property name="templates.dir" value="./templates"/>
<property name="templates.default.dir" value="${templates.dir}/default"/>
<property name="closure.compiler.url" value="http://closure-compiler.googlecode.com/files/compiler-latest.zip"/>
<available property="closure.available" file="${tools}/compiler.jar"/>
<target name="get-closure" unless="closure.available">
<mkdir dir="${tools}"/>
<get src="${closure.compiler.url}" dest="${tools}"/>
<unzip dest="${tools}">
<fileset dir="${tools}">
<include name="*.zip"/>
</fileset>
</unzip>
<delete file="${tools}/compiler-latest.zip"/>
</target>
<target name="prepare" depends="get-closure">
<taskdef name="jscomp" classname="com.google.javascript.jscomp.ant.CompileTask" classpath="${tools}/compiler.jar"/>
</target>
<target name="all" depends="compress,ace,xar"/>
<target name="ace">
<mkdir dir="${ace}"/>
<copy todir="${ace}">
<fileset dir="${ace.src}/build/src">
<exclude name="*-uncompressed.js"/>
<exclude name="*-noconflict.js"/>
</fileset>
</copy>
</target>
<target name="compress" depends="prepare">
<jscomp compilationLevel="simple" debug="false" output="${scripts}/eXide-1.0.min.js">
<sources dir="${basedir}/src">
<file name="ace-modes.js"/>
<file name="util.js"/>
<file name="events.js"/>
<file name="commands.js"/>
<file name="mode-helper.js"/>
<file name="xquery-helper.js"/>
<file name="xml-helper.js"/>
<file name="less-helper.js"/>
<file name="outline.js"/>
<file name="editor.js"/>
<file name="eXide.js"/>
<file name="deployment.js"/>
<file name="templates.js"/>
<file name="help.js"/>
<file name="preferences.js"/>
<file name="resources.js"/>
<file name="find.js"/>
<file name="menu.js"/>
</sources>
</jscomp>
<jscomp compilationLevel="simple" debug="false" output="${scripts}/jquery/jquery.plugins.min.js">
<sources dir="${scripts}/jquery">
<file name="jquery.event.drag-2.0.js"/>
<file name="jquery.layout-1.3.0.rc30.4.js"/>
<file name="jquery.fileupload.js"/>
<file name="jquery.fileupload-ui.js"/>
<file name="slick.core.js"/>
<file name="slick.rowselectionmodel.js"/>
<file name="slick.grid.js"/>
<file name="slick.editors.js"/>
<file name="slick.formatters.js"/>
<file name="slick.cellselectionmodel.js"/>
<file name="slick.cellrangeselector.js"/>
</sources>
</jscomp>
</target>
<target name="clean">
<delete dir="${ace}"/>
<delete file="${scripts}/eXide-1.0.min.js"/>
<delete file="${scripts}/jquery/jquery.plugins.min.js"/>
</target>
<target name="xar">
<mkdir dir="${build}"/>
<zip destfile="${build}/eXide-1.0.xar">
<fileset dir=".">
<include name="*.*"/>
<include name="modules/**"/>
<include name="resources/**"/>
<include name="templates/**"/>
<include name="src/**"/>
<exclude name=".git*"/>
</fileset>
</zip>
</target>
</project>