/
build.xml
95 lines (69 loc) · 2.36 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
<project name="Package PhoneGap BlackBerry WebWorks Plugin" default="help">
<!-- LOAD PROPERTIES -->
<property prefix="properties" file="plugin.properties" />
<property name="input.jar.src" location="src" />
<property name="input.www.dir" location="www" />
<property name="output.dir" location="build" />
<property name="output.jar.dir" value="${output.dir}/www/ext" />
<property name="output.jar.file" value="${properties.plugin.name}.jar" />
<property name="output.www.dir" value="${output.dir}/www" />
<echo message="${output.dir}" />
<!-- BUILD -->
<target name="build" depends="clean">
<!-- create build directories -->
<mkdir dir="${output.dir}" />
<mkdir dir="${output.jar.dir}" />
<mkdir dir="${output.www.dir}" />
<!-- build jar -->
<zip compress="false"
destfile="${output.jar.dir}/${output.jar.file}"
basedir="${input.jar.src}"
excludes="**/build/**,**/.settings/**,**/.project" />
<!-- copy www assets -->
<copy todir="${output.www.dir}">
<fileset dir="${input.www.dir}" />
</copy>
<echo>
Plugin Package Complete!
========================
Where:
------
${output.www.dir}
${output.jar.dir}
Installation:
-------------
1. If you have a project at c:\my_project\
2. Install the native extension:
- copy ${output.jar.dir}\${output.jar.file}
to c:\my_project\www\ext\
3. Install the Web assets:
- copy ${output.www.dir}
to c:\my_project\www\
</echo>
</target>
<!-- CLEAN -->
<target name="clean">
<delete dir="${output.dir}" />
</target>
<!-- HELP -->
<target name="help">
<echo>
NAME
${ant.project.name}
SYNOPSIS
ant COMMAND [-D<argument>=<value>]...
DESCRIPTION
You can package your plugin for use in PhoneGap BlackBerry WebWorks projects.
COMMANDS
help .............. Show this help menu.
ant, ant help
build ............. Packages plugin source into Java archive file.
ant build
clean ............. Remove existing archive file.
ant clean
GETTING STARTED
1. Edit plugin.properties to give your plugin a name
2. <ant build> to package your plugin for distribution
</echo>
</target>
</project>