forked from IBM-MIL/IBM-Ready-App-for-Retail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
151 lines (126 loc) · 6.22 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<project name="RAHybrid" default="build" basedir=".">
<description>
Ready Apps Hybrid build project
</description>
<!-- set global properties for this build -->
<property name="build" location="build"/>
<property name="dist" location="dist" />
<property name="src.html" location="html"/>
<property name="src.android" location="Android/Summit/app/src/main/assets/html"/>
<property name="src.ios" location="iOS/ReadyAppRetail/html"/>
<target name="build-android" description="compile and distribute the source for Android" >
<!-- wipe out directories -->
<delete includeemptydirs="true" failonerror="false" dir="${src.android}">
</delete>
<copy todir="${src.android}" flatten="false">
<fileset dir="${src.html}" includes="**">
<exclude name="**/test/**" />
<exclude name="**/node_modules/**" />
</fileset>
</copy>
</target>
<target name="build-ios" description="compile and distribute the source for iOS" >
<mkdir dir="${build}"/>
<mkdir dir="${build}/iOS"/>
<copy todir="${build}/iOS" flatten="true">
<fileset dir="${src.html}">
<include name="index.html" />
<include name="views/**" />
<include name="fonts/**" />
<include name="img/**" />
<include name="js/src/**" />
<include name="css/**" />
<include name="js/bower_components/angular/angular.js" />
<include name="js/bower_components/angular-route/angular-route.js" />
<include name="js/bower_components/angular-touch/angular-touch.js" />
<include name="js/bower_components/angular-animate/angular-animate.js" />
<include name="js/bower_components/jquery/dist/jquery.js" />
<include name="js/vendor/angular-translate.js" />
</fileset>
</copy>
<replace value="" token="css/">
<fileset dir="${build}/iOS/">
<include name="*.html"/>
</fileset>
</replace>
<replace value="" token="./img/">
<fileset dir="${build}/iOS/">
<include name="*.html"/>
<include name="*.css"/>
</fileset>
</replace>
<replace value="" token="../img/">
<fileset dir="${build}/iOS/">
<include name="*.css"/>
</fileset>
</replace>
<replace value="" token="../../img/">
<fileset dir="${build}/iOS/">
<include name="*.css"/>
</fileset>
</replace>
<replace value="" token=".././img/">
<fileset dir="${build}/iOS/">
<include name="*.css"/>
</fileset>
</replace>
<replace value="" token="../fonts/">
<fileset dir="${build}/iOS/">
<include name="*.css"/>
</fileset>
</replace>
<replace value="" token="views/">
<fileset dir="${build}/iOS/">
<include name="*.js"/>
</fileset>
</replace>
<replace value="" token="../">
<fileset dir="${build}/iOS/">
<include name="*.html"/>
<include name="*.css"/>
<include name="*.js"/>
</fileset>
</replace>
<replace file="${build}/iOS/index.html" value="" token="js/bower_components/angular/"/>
<replace file="${build}/iOS/index.html" value="" token="js/bower_components/angular-route/"/>
<replace file="${build}/iOS/index.html" value="" token="js/bower_components/angular-touch/"/>
<replace file="${build}/iOS/index.html" value="" token="js/bower_components/angular-animate/"/>
<replace file="${build}/iOS/index.html" value="" token="js/bower_components/jquery/dist/"/>
<replace file="${build}/iOS/index.html" value="" token="js/vendor/"/>
<replace file="${build}/iOS/index.html" value="" token="js/src/config/"/>
<replace file="${build}/iOS/index.html" value="" token="views/templates/"/>
<replace file="${build}/iOS/index.html" value="" token="js/src/controllers/"/>
<replace file="${build}/iOS/index.html" value="" token="js/src/directives/"/>
<replace file="${build}/iOS/index.html" value="" token="js/src/providers/"/>
<replace file="${build}/iOS/index.html" value="" token="js/src/interfaces/"/>
<replace file="${build}/iOS/index.html" value="" token="js/test/"/>
<replace file="${build}/iOS/index.html" value="" token="js/src/"/>
<replace file="${build}/iOS/product-details.html" value="" token="img/"/>
<replace file="${build}/iOS/style.css" value="" token="../../img/"/>
<!--replace file="${build}/iOS/metrics.html" value="" token="./img/"/>
<replace file="${build}/iOS/style.css" value="" token="../../img/"/>
<replace file="${build}/iOS/style.css" value="" token=".././img/"/>
<replace file="${build}/iOS/style.css" value="" token="../img/"/>
<replace file="${build}/iOS/style.css" value="" token="../fonts/"/>
<replace file="${build}/iOS/index.js" value="" token="views/"/>
<replace file="${build}/iOS/metrics-steps.html" value="" token="./img/"/-->
<!--replaceregexp file="${build}/iOS/index.html" match="(?=\w+\.\w{3,4}$).+" replace="" flags="g" byline="true" flags="g" /-->
<!-- wipe out directories -->
<delete includeemptydirs="true" failonerror="false" dir="${src.ios}" >
</delete>
<copy todir="${src.ios}" includeemptydirs="false">
<fileset dir="${build}/iOS" includes="**"/>
</copy>
<delete dir="${build}"/>
</target>
<target name="build" depends="build-ios,build-android" description="compile and distribute the source for each OS" >
</target>
<target name="clean"
description="clean up" >
<delete dir="${build}"/>
<delete includeemptydirs="true" dir="${src.android}">
</delete>
<delete includeemptydirs="true" dir="${src.ios}">
</delete>
</target>
</project>