forked from mbeddr/mbeddr.arduino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
37 lines (36 loc) · 2.07 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
<project name="mbeddr download and deploy plugins" default="build-arduino">
<property file="build.properties"/>
<property name="plugins.folder.name" value="plugins"/>
<!-- mbeddr.platform -->
<property name="mbeddr.arduino.build-path.postfix" value="${mbeddr.arduino.home}build/build/artifacts/mbeddr.arduino" />
<property name="mbeddr.arduino.build-file.location" value="${mbeddr.arduino.home}/build/" />
<property name="mbeddr.arduino.build-file.name" value="build.xml" />
<property name="mbeddr.arduino.working-dir" value="${mbeddr.arduino.home}" />
<!-- misc -->
<property name="clean-generated-code.task" value="cleanSources" />
<property name="clean-plugins.task" value="clean" />
<property name="generate-code.task" value="generate" />
<property name="build-plugin.task" value="assemble" />
<property name="run-tests.task" value="check" />
<!-- validations -->
<fail unless="mps.home">mps.home must be set in your build.properties</fail>
<fail unless="mbeddr.github.core.home">mbeddr.github.core.home must be set in your build.properties</fail>
<fail unless="mbeddr.arduino.home">mbeddr.arduino.home must be set in your build.properties</fail>
<fail message="Your MPS installation (${mps.home}) doesn't contain a ${plugins.folder.name} folder">
<condition>
<not>
<resourcecount count="1">
<dirset dir="${mps.home}" >
<include name="${plugins.folder.name}"/>
</dirset>
</resourcecount>
</not>
</condition>
</fail>
<target name="build-arduino">
<ant antfile="${mbeddr.arduino.build-file.name}" dir="${mbeddr.arduino.build-file.location}" target="${clean-plugins.task}" />
<ant antfile="${mbeddr.arduino.build-file.name}" dir="${mbeddr.arduino.build-file.location}" target="${clean-generated-code.task}" />
<ant antfile="${mbeddr.arduino.build-file.name}" dir="${mbeddr.arduino.build-file.location}" target="${generate-code.task}" />
<ant antfile="${mbeddr.arduino.build-file.name}" dir="${mbeddr.arduino.build-file.location}" target="${build-plugin.task}" />
</target>
</project>