blob: 80e7853315a6c531fc0aed82fccfae6e22f1141a [file] [log] [blame]
Mads Ager418d1ca2017-05-22 09:35:49 +02001# Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
2# for details. All rights reserved. Use of this source code is governed by a
3# BSD-style license that can be found in the LICENSE file.
4
5import glob
6import os
7import utils
8
9THIRD_PARTY = os.path.join(utils.REPO_ROOT, 'third_party')
10BASE = os.path.join(THIRD_PARTY, 'gmscore')
11
12V4_BASE = os.path.join(BASE, 'v4')
13V5_BASE = os.path.join(BASE, 'v5')
14V6_BASE = os.path.join(BASE, 'v6')
15V7_BASE = os.path.join(BASE, 'v7')
16V8_BASE = os.path.join(BASE, 'v8')
17
18V9_BASE = os.path.join(BASE, 'gmscore_v9')
19V9_PREFIX = os.path.join(V9_BASE, 'GmsCore_prod_alldpi_release_all_locales')
20
21V10_BASE = os.path.join(BASE, 'gmscore_v10')
22V10_PREFIX = os.path.join(V10_BASE, 'GmsCore_prod_alldpi_release_all_locales')
Stephan Herhuta07e5ff2017-07-07 10:53:12 +020023
24LATEST_BASE = os.path.join(BASE, 'latest')
25LATEST_PREFIX = os.path.join(LATEST_BASE, 'GmsCore_prod_alldpi_release_all_locales')
Yohann Roussel49e54a12017-06-23 18:08:07 +020026ANDROID_L_API = '21'
Mads Ager418d1ca2017-05-22 09:35:49 +020027
28# NOTE: we always use android.jar for SDK v25, later we might want to revise it
29# to use proper android.jar version for each of gmscore version separately.
30ANDROID_JAR = os.path.join(THIRD_PARTY, 'android_jar', 'lib-v25', 'android.jar')
31
32VERSIONS = {
33 'v4': {
34 'dex' : {
35 'inputs' : glob.glob(os.path.join(V4_BASE, '*.dex')),
36 'pgmap' : os.path.join(V4_BASE, 'proguard.map'),
37 'libraries' : [ANDROID_JAR],
38 'r8-flags': '--ignore-missing-classes',
Ian Zerny877c1862017-07-06 11:12:26 +020039 'min-api' : ANDROID_L_API,
Mads Ager418d1ca2017-05-22 09:35:49 +020040 }
41 },
42 'v5': {
43 'dex' : {
44 'inputs' : glob.glob(os.path.join(V5_BASE, '*.dex')),
45 'pgmap' : os.path.join(V5_BASE, 'proguard.map'),
46 'libraries' : [ANDROID_JAR],
47 'r8-flags': '--ignore-missing-classes',
Ian Zerny877c1862017-07-06 11:12:26 +020048 'min-api' : ANDROID_L_API,
Mads Ager418d1ca2017-05-22 09:35:49 +020049 }
50 },
51 'v6': {
52 'dex' : {
53 'inputs' : glob.glob(os.path.join(V6_BASE, '*.dex')),
54 'pgmap' : os.path.join(V6_BASE, 'proguard.map'),
55 'libraries' : [ANDROID_JAR],
56 'r8-flags': '--ignore-missing-classes',
Ian Zerny877c1862017-07-06 11:12:26 +020057 'min-api' : ANDROID_L_API,
Mads Ager418d1ca2017-05-22 09:35:49 +020058 }
59 },
60 'v7': {
61 'dex' : {
62 'inputs' : glob.glob(os.path.join(V7_BASE, '*.dex')),
63 'pgmap' : os.path.join(V7_BASE, 'proguard.map'),
64 'libraries' : [ANDROID_JAR],
65 'r8-flags': '--ignore-missing-classes',
Ian Zerny877c1862017-07-06 11:12:26 +020066 'min-api' : ANDROID_L_API,
Mads Ager418d1ca2017-05-22 09:35:49 +020067 }
68 },
69 'v8': {
70 'dex' : {
71 'inputs' : glob.glob(os.path.join(V8_BASE, '*.dex')),
72 'pgmap' : os.path.join(V8_BASE, 'proguard.map'),
73 'libraries' : [ANDROID_JAR],
74 'r8-flags': '--ignore-missing-classes',
Ian Zerny877c1862017-07-06 11:12:26 +020075 'min-api' : ANDROID_L_API,
Mads Ager418d1ca2017-05-22 09:35:49 +020076 }
77 },
78 'v9': {
79 'dex' : {
80 'inputs': [os.path.join(V9_BASE, 'armv7_GmsCore_prod_alldpi_release.apk')],
81 'pgmap': '%s_proguard.map' % V9_PREFIX,
82 'libraries' : [ANDROID_JAR],
83 'r8-flags': '--ignore-missing-classes',
Ian Zerny877c1862017-07-06 11:12:26 +020084 'min-api' : ANDROID_L_API,
Mads Ager418d1ca2017-05-22 09:35:49 +020085 },
86 'deploy' : {
87 'pgconf': ['%s_proguard.config' % V9_PREFIX],
Yohann Roussel49e54a12017-06-23 18:08:07 +020088 'inputs': ['%s_deploy.jar' % V9_PREFIX],
Ian Zerny877c1862017-07-06 11:12:26 +020089 'min-api' : ANDROID_L_API,
Mads Ager418d1ca2017-05-22 09:35:49 +020090 },
91 'proguarded' : {
92 'inputs': ['%s_proguard.jar' % V9_PREFIX],
Lars Bak9bee2d82017-08-23 11:00:04 +020093 'main-dex-list': os.path.join(V9_BASE, 'main_dex_list.txt'),
Yohann Roussel49e54a12017-06-23 18:08:07 +020094 'pgmap': '%s_proguard.map' % V9_PREFIX,
Ian Zerny877c1862017-07-06 11:12:26 +020095 'min-api' : ANDROID_L_API,
Yohann Roussel49e54a12017-06-23 18:08:07 +020096 }
Mads Ager418d1ca2017-05-22 09:35:49 +020097 },
98 'v10': {
99 'dex' : {
100 'inputs': [os.path.join(V10_BASE, 'armv7_GmsCore_prod_alldpi_release.apk')],
101 'pgmap': '%s_proguard.map' % V10_PREFIX,
102 'libraries' : [ANDROID_JAR],
103 'r8-flags': '--ignore-missing-classes',
Ian Zerny877c1862017-07-06 11:12:26 +0200104 'min-api' : ANDROID_L_API,
Mads Ager418d1ca2017-05-22 09:35:49 +0200105 },
106 'deploy' : {
107 'inputs': ['%s_deploy.jar' % V10_PREFIX],
108 'pgconf': ['%s_proguard.config' % V10_PREFIX],
Ian Zerny877c1862017-07-06 11:12:26 +0200109 'min-api' : ANDROID_L_API,
Mads Ager418d1ca2017-05-22 09:35:49 +0200110 },
111 'proguarded' : {
112 'inputs': ['%s_proguard.jar' % V10_PREFIX],
Lars Bak9bee2d82017-08-23 11:00:04 +0200113 'main-dex-list': os.path.join(V10_BASE, 'main_dex_list.txt') ,
Yohann Roussel49e54a12017-06-23 18:08:07 +0200114 'pgmap': '%s_proguard.map' % V10_PREFIX,
Ian Zerny877c1862017-07-06 11:12:26 +0200115 'min-api' : ANDROID_L_API,
Mads Ager418d1ca2017-05-22 09:35:49 +0200116 }
117 },
Stephan Herhuta07e5ff2017-07-07 10:53:12 +0200118 'latest': {
119 'deploy' : {
120 'inputs': ['%s_deploy.jar' % LATEST_PREFIX],
Stephan Herhut35ab2232017-07-10 13:45:27 +0200121 'pgconf': [
122 '%s_proguard.config' % LATEST_PREFIX,
123 '%s/proguardsettings/GmsCore_proguard.config' % THIRD_PARTY],
Stephan Herhut0e135c82017-07-07 13:37:08 +0200124 'min-api' : ANDROID_L_API,
Stephan Herhuta07e5ff2017-07-07 10:53:12 +0200125 },
Tamas Kenezaeb314a2017-08-23 13:42:55 +0200126 'proguarded' : {
127 'inputs': ['%s_proguard.jar' % LATEST_PREFIX],
Tamas Kenez228870b2017-08-23 13:53:22 +0200128 'main-dex-list': os.path.join(LATEST_BASE, 'main_dex_list.txt') ,
Tamas Kenezaeb314a2017-08-23 13:42:55 +0200129 'pgmap': '%s_proguard.map' % LATEST_PREFIX,
130 'min-api' : ANDROID_L_API,
131 }
Stephan Herhuta07e5ff2017-07-07 10:53:12 +0200132 },
Mads Ager418d1ca2017-05-22 09:35:49 +0200133}