Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
76 lines (54 sloc) 1.95 KB
<project name="Build and Test a Plugin" default="help">
<!-- LOAD PROPERTIES -->
<property name="plugin.dir" location="plugin" />
<property name="plugin.build.file" location="${plugin.dir}/build.xml" />
<property name="plugin.build.dir" location="${plugin.dir}/build" />
<property name="app.dir" location="test" />
<property name="app.build.file" location="${app.dir}/build.xml" />
<!-- BUILD PLUGIN -->
<target name="build">
<build-plugin />
</target>
<!-- LOAD DEVICE -->
<target name="load-device">
<build-plugin />
<ant antfile="${app.build.file}" target="load-device" dir="${app.dir}" />
</target>
<!-- LOAD SIMULATOR -->
<target name="load-simulator">
<build-plugin />
<ant antfile="${app.build.file}" target="load-simulator" dir="${app.dir}" />
</target>
<!-- HELP -->
<target name="help">
<echo>
NAME
${ant.project.name}
SYNOPSIS
ant COMMAND
DESCRIPTION
You can build and deploy the plugin to the test application.
COMMANDS
help .............. Show this help menu.
ant, ant help
build ............. Build the plugin to ${plugin.build.dir}
build
load-device ....... Build plugin and run test-suite on a connected USB device.
ant load-device
load-simulator .... Build plugin and run test-suite on default simulator.
ant load-simulator
GETTING STARTED
1. Edit ${app.dir}/project.properties
2. &lt;ant load-simulator&gt; to run the plugin on the simulator
</echo>
</target>
<!-- MACRO: BUILD PLUGIN -->
<macrodef name="build-plugin">
<sequential>
<ant antfile="${plugin.build.file}" target="build" dir="${plugin.dir}" />
<copy todir="${app.dir}">
<fileset dir="${plugin.build.dir}" />
</copy>
</sequential>
</macrodef>
</project>