-
Notifications
You must be signed in to change notification settings - Fork 688
/
build.xml
100 lines (87 loc) · 3.16 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
96
97
98
99
<project name="astrid-project">
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="astrid/antlib/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<target name="clean">
<delete dir="release" />
<subant target="clean">
<fileset file="astrid/build.xml" />
</subant>
</target>
<target name="get-version">
<loadfile property="manifest" srcFile="astrid/AndroidManifest.xml" />
<propertyregex property="manifest.version.code"
input="${manifest}"
regexp="android:versionCode="(.*)""
select="\1" />
<propertyregex property="manifest.version.name"
input="${manifest}"
regexp="android:versionName="([^" ]*)"
select="\1" />
<echo message="Astrid Project: version ${manifest.version.code}, named ${manifest.version.name}" />
</target>
<target name="release" depends="clean,get-version">
<subant target="release">
<fileset file="astrid/build.xml" />
</subant>
</target>
<target name="release-all" depends="clean,get-version,release,release-lite,release-amazon,release-amazon-signed,release-nook,release-nomarket">
<!-- custom builds -->
<for list="-other" param="name">
<sequential>
<subant target="release-custom">
<fileset file="astrid/build.xml" />
<property name="custom.version.name" value="@{name}" />
</subant>
</sequential>
</for>
</target>
<target name="release-amazon" depends="get-version">
<subant>
<fileset file="astrid/build.xml" />
<property name="custom.version.name" value=".1000" />
<property name="custom.market.strategy" value="AmazonMarketStrategy" />
<target name="unsigned-custom" />
</subant>
</target>
<target name="release-amazon-signed" depends="get-version">
<subant target="release-custom">
<fileset file="astrid/build.xml" />
<property name="custom.version.name" value=".1000-signed" />
<property name="custom.market.strategy" value="AmazonMarketStrategy" />
</subant>
</target>
<target name="release-nomarket" depends="get-version">
<subant target="release-custom">
<fileset file="astrid/build.xml" />
<property name="custom.version.name" value="-nomarket" />
<property name="custom.market.strategy" value="NoMarketStrategy" />
</subant>
</target>
<target name="release-nook" depends="get-version">
<subant target="release-custom">
<fileset file="astrid/build.xml" />
<property name="custom.version.name" value="-nook" />
<property name="custom.market.strategy" value="NookMarketStrategy" />
</subant>
</target>
<target name="release-lite" depends="get-version">
<subant target="release-lite">
<fileset file="astrid/build.xml" />
</subant>
</target>
<target name="debug">
<subant>
<fileset file="astrid/build.xml" />
<target name="debug" />
</subant>
</target>
<target name="install">
<subant>
<fileset file="astrid/build.xml" />
<target name="install" />
</subant>
</target>
</project>