forked from beeware/voc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
59 lines (50 loc) · 1.85 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
<project name="python" default="all" basedir=".">
<description>
Build Python support libraries for voc
</description>
<property environment="env"/>
<property name="release" value="6"/>
<exec executable="python" outputProperty="python-version">
<arg value="-c"/>
<arg value="import sys; print('.'.join(sys.version.split('.',3)[:2]))"/>
</exec>
<condition property="build" value="${env.VOC_BUILD_DIR}" else="build">
<isset property="env.VOC_BUILD_DIR" />
</condition>
<condition property="dist" value="${env.VOC_DIST_DIR}" else="dist">
<isset property="env.VOC_DIST_DIR" />
</condition>
<!-- set global properties for this build -->
<property name="src" location="python"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<target name="checkstyle" description="Runs checkstyle">
<taskdef resource="com/puppycrawl/tools/checkstyle/ant/checkstyle-ant-task.properties">
<classpath>
<pathelement location="lib/checkstyle-6.19-all.jar" />
</classpath>
</taskdef>
<checkstyle config="checkstyle.xml" failureProperty="checkstyle.failure.property">
<formatter type="plain" />
<fileset dir="python" includes="**/*.java" />
</checkstyle>
</target>
<target name="java">
<ant antfile="build-java.xml" target="dist"/>
<ant antfile="build-java.xml" target="dist-testdaemon"/>
</target>
<target name="android">
<ant antfile="build-android.xml" target="dist"/>
</target>
<target name="all" depends="java, android" />
<target name="upload" depends="java, android" description="Upload assets to S3">
<exec executable="python">
<arg value="tools/upload.py"/>
<arg value="b${release}"/>
</exec>
</target>
<target name="clean" description="Clean up">
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>