-
Notifications
You must be signed in to change notification settings - Fork 2
/
build_5.0.xml
255 lines (235 loc) · 13.6 KB
/
build_5.0.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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE project>
<!--=========================================================================-->
<!-- -->
<!-- PROJECT: Build AROMA LP-GAPPS 5.0 -->
<!-- -->
<!-- FILE: build_5.0.xml -->
<!-- -->
<!-- DESCRIPTION: -->
<!-- -->
<!-- builds the gapps -->
<!-- -->
<!-- AUTHORS: -->
<!-- -->
<!-- tortureduck: Manfred Hofbauer -->
<!-- dankoman : Daniel Koman -->
<!-- victorlapin: Victor Lapin -->
<!-- raulx222 : Raul Petru -->
<!-- uzen : Dmitry Popov -->
<!-- -->
<!--=========================================================================-->
<project name="buildGapps"
default="buildAll"
basedir=".">
<property file="build.properties"/>
<description>
This file list used by ant to build the Slim Gapps project
</description>
<!--=======================================================================-->
<!-- some variables -->
<!--=======================================================================-->
<property name="app.name" value="buildGapps"/>
<property name="app.dir" value="${basedir}"/>
<property name="work.dir" value="${app.dir}/work"/>
<property name="addons.dir" value="${app.dir}/addons"/>
<property name="build.dir" value="${app.dir}/build_5.0"/>
<property name="structure.dir" value="${app.dir}/structure"/>
<property name="sign.jar" value="${app.dir}/tools/signapk.jar"/>
<property name="sign.pem" value="${app.dir}/tools/testkey.x509.pem"/>
<property name="sign.pk8" value="${app.dir}/tools/testkey.pk8"/>
<property name="extra.dir" value="${app.dir}/extras" />
<tstamp>
<format property="build.today" pattern="yyyyMMdd" />
</tstamp>
<!--=======================================================================-->
<!-- complete build -->
<!--=======================================================================-->
<target name="buildAll"
depends="cleanupBefore,initit,buildAroma,cleanupAfter"
description="execute complete build"/>
<!--=======================================================================-->
<!-- aroma -->
<!--=======================================================================-->
<target name="buildAroma"
description="execute aroma gapps build">
<!-- preparations -->
<property environment="env"/>
<property name="file.name.aroma" value="${build.dir}/AROMA-LP-GAPPS-5.0-${build.today}.zip"/>
<delete dir="${work.dir}"/>
<propertyfile file="${build.dir}/gapps.filenames">
<entry key="fullfilename" value="${file.name.aroma}"/>
</propertyfile>
<!-- copy files -->
<copy todir="${work.dir}">
<fileset dir="${structure.dir}">
<exclude name="META-INF/com/google/android/**"/>
</fileset>
</copy>
<copy todir="${work.dir}">
<fileset dir="${app.dir}/extras/aroma"/>
</copy>
<copy todir="${work.dir}">
<fileset dir="${addons.dir}"/>
</copy>
<copy file="${app.dir}/extras/g.prop" todir="${work.dir}/system/etc">
<filterchain>
<replaceregex pattern="@build.version@" replace="slim.aroma.${build.today}" flags="i"/>
<replaceregex pattern="@min.version@" replace="${5.0_PRODUCT_VERSION_MAJOR}" flags="i"/>
</filterchain>
</copy>
<copy file="${app.dir}/extras/tools.sh" todir="${work.dir}">
<filterchain>
<replaceregex pattern="@package@" replace="${5.0_PRODUCT_VERSION_MAJOR}" flags="gi" />
</filterchain>
</copy>
<antcall target="values" />
<!-- generate backup script -->
<fileset id="item.file" dir="${work.dir}/system" includes="**/*" />
<pathconvert refid="item.file" property="file.list.aroma" pathsep=" " dirsep="/">
<map from="${work.dir}/system/" to=''/>
</pathconvert>
<copy todir="${work.dir}/system/addon.d">
<fileset dir="${app.dir}/extras">
<include name="80-gapps.sh"/>
<include name="81-remstock.sh"/>
</fileset>
<filterchain>
<replaceregex pattern="@file.list@" replace="${file.list.aroma}" flags="i"/>
</filterchain>
</copy>
<!-- zip and sign it -->
<antcall target="ZipAndSigning">
<param name="hfile.name" value="${file.name.aroma}"/>
</antcall>
</target>
<!--=======================================================================-->
<!-- generate values.prop -->
<!--=======================================================================-->
<target name="values">
<taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy"/>
<dirset id="dirs" dir="." includes="*"/>
<groovy>
import java.text.SimpleDateFormat
def sdf = new SimpleDateFormat("MMMM, dd yyyy")
new File("work/values.prop").withWriter { w ->
w.println "android_ver=5.0.x"
w.println "multi_dpi=check.checked"
w.println "multi_dpi_desc=Status: stable. Default: checked"
w.println "build_date=${sdf.format(new Date())}"
def youtube_size = new File('structure/system/app/YouTube').directorySize()
def chrome_size = new File('structure/system/app/Chrome').directorySize()
def gmail_size = new File('structure/system/app/Gmail2').directorySize()
def hangouts_size = new File('structure/system/app/Hangouts').directorySize()
def hangoutsdialer_size = new File('structure/system/app/HangoutsDialer').directorySize()
def talkback_size = new File('structure/system/priv-app/talkback').directorySize()
def facelock_size = new File('structure/optional').directorySize() + new File('structure/system/vendor').directorySize() + new File('structure/system/app/FaceLock').directorySize()
def messenger_size = new File('structure/system/app/Messenger').directorySize()
def nw_size = new File('structure/system/app/GenieWidget').directorySize()
def now_size = new File('structure/system/app/GoogleHome').directorySize()
def tts_size = new File('structure/system/app/GoogleTTS').directorySize() + new File('structure/system/tts').directorySize()
def keyboard_size = new File('structure/system/app/Keyboard').directorySize() + new File('structure/system/usr').directorySize()
def music_size = new File('structure/system/app/Music2').directorySize()
def search_size = new File('structure/system/priv-app/Velvet').directorySize()
def calendar_size = new File('structure/system/app/CalendarGoogle').directorySize()
def drive_size = new File('structure/system/app/Drive').directorySize()
def keep_size = new File('structure/system/app/Keep').directorySize()
def maps_size = new File('structure/system/app/Maps').directorySize()
def plus_size = new File('structure/system/app/PlusOne').directorySize()
def streetview_size = new File('structure/system/app/Street').directorySize()
def translate_size = new File('structure/system/app/Translate').directorySize()
def wallet_size = new File('structure/system/app/Wallet').directorySize()
def books_size = new File('structure/system/app/Books').directorySize()
def camera_size = new File('structure/system/app/CameraGoogle').directorySize()
def cloudprint_size = new File('structure/system/app/CloudPrint').directorySize()
def docs_size = new File('structure/system/app/Docs').directorySize()
def games_size = new File('structure/system/app/Games').directorySize()
def movies_size = new File('structure/system/app/Movies').directorySize()
def news_size = new File('structure/system/app/Newsstand').directorySize()
def sheets_size = new File('structure/system/app/Sheets').directorySize()
def slides_size = new File('structure/system/app/Slides').directorySize()
def coreapps_size = new File('structure/system/app/ConfigUpdater').directorySize() + new File('structure/system/app/ExchangeServices').directorySize() + new File('structure/system/app/GoogleCalendarSyncAdapter').directorySize() + new File('structure/system/app/GoogleContactsSyncAdapter').directorySize() + new File('structure/system/etc').directorySize() + new File('structure/system/framework').directorySize() + new File('structure/system/lib').directorySize() + new File('structure/system/priv-app/GoogleBackupTransport').directorySize() + new File('structure/system/priv-app/GoogleFeedback').directorySize() + new File('structure/system/priv-app/GoogleLoginService').directorySize() + new File('structure/system/priv-app/GoogleOneTimeInitializer').directorySize() + new File('structure/system/priv-app/GooglePartnerSetup').directorySize() + new File('structure/system/priv-app/GoogleServicesFramework').directorySize() + new File('structure/system/priv-app/Phonesky').directorySize() + new File('structure/system/priv-app/PrebuiltGmsCore').directorySize() + new File('structure/system/priv-app/SetupWizard').directorySize()
w.println "youtube_size=${youtube_size}"
w.println "chrome_size=${chrome_size}"
w.println "gmail_size=${gmail_size}"
w.println "hangouts_size=${hangouts_size}"
w.println "hangoutsdialer_size=${hangoutsdialer_size}"
w.println "talkback_size=${talkback_size}"
w.println "facelock_size=${facelock_size}"
w.println "messenger_size=${messenger_size}"
w.println "nw_size=${nw_size}"
w.println "now_size=${now_size}"
w.println "tts_size=${tts_size}"
w.println "keyboard_size=${keyboard_size}"
w.println "music_size=${music_size}"
w.println "search_size=${search_size}"
w.println "calendar_size=${calendar_size}"
w.println "drive_size=${drive_size}"
w.println "keep_size=${keep_size}"
w.println "maps_size=${maps_size}"
w.println "plus_size=${plus_size}"
w.println "streetview_size=${streetview_size}"
w.println "translate_size=${translate_size}"
w.println "wallet_size=${wallet_size}"
w.println "books_size=${books_size}"
w.println "camera_size=${camera_size}"
w.println "cloudprint_size=${cloudprint_size}"
w.println "docs_size=${docs_size}"
w.println "games_size=${games_size}"
w.println "movies_size=${movies_size}"
w.println "news_size=${news_size}"
w.println "sheets_size=${sheets_size}"
w.println "slides_size=${slides_size}"
w.println "coreapps_size=${coreapps_size}"
}
</groovy>
</target>
<!--=======================================================================-->
<!-- zip and sign it -->
<!--=======================================================================-->
<target name="ZipAndSigning">
<zip destfile="${build.dir}/unsigned.zip" basedir="${work.dir}"></zip>
<echo message="Signing gapps"/>
<java dir="${build.dir}" fork="true" failonerror="true" maxmemory="1700m" jar="${sign.jar}">
<arg value="-w"/>
<arg value="${sign.pem}"/>
<arg value="${sign.pk8}"/>
<arg value="${build.dir}/unsigned.zip"/>
<arg value="${hfile.name}"/>
</java>
</target>
<!--=======================================================================-->
<!-- cleanupBefore new build -->
<!--=======================================================================-->
<target name="cleanupBefore"
description="delete old directories">
<delete dir="${build.dir}"/>
<delete dir="${work.dir}"/>
</target>
<!--=======================================================================-->
<!-- cleanupAfter build is done -->
<!--=======================================================================-->
<target name="cleanupAfter"
description="delete unnecessary build files">
<echo message="Cleaning up"/>
<delete file="${build.dir}/unsigned.zip"/>
<delete file="${build.dir}/gapps.filenames"/>
</target>
<!--=======================================================================-->
<!-- initiating build -->
<!--=======================================================================-->
<target name ="initit"
description="initiating-steps">
<mkdir dir="${build.dir}"/>
<mkdir dir="${work.dir}"/>
</target>
<!--=======================================================================-->
<!-- test build -->
<!--=======================================================================-->
<target name ="testit"
description="testtest">
<echo message="${x.dir}"/>
<property name="x.dir" value="test9899"/>
<echo message="${x.dir}"/>
</target>
</project>