Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 1 | # 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 | |
| 5 | import glob |
| 6 | import os |
| 7 | import utils |
| 8 | |
| 9 | THIRD_PARTY = os.path.join(utils.REPO_ROOT, 'third_party') |
| 10 | BASE = os.path.join(THIRD_PARTY, 'gmscore') |
| 11 | |
| 12 | V4_BASE = os.path.join(BASE, 'v4') |
| 13 | V5_BASE = os.path.join(BASE, 'v5') |
| 14 | V6_BASE = os.path.join(BASE, 'v6') |
| 15 | V7_BASE = os.path.join(BASE, 'v7') |
| 16 | V8_BASE = os.path.join(BASE, 'v8') |
| 17 | |
| 18 | V9_BASE = os.path.join(BASE, 'gmscore_v9') |
| 19 | V9_PREFIX = os.path.join(V9_BASE, 'GmsCore_prod_alldpi_release_all_locales') |
| 20 | |
| 21 | V10_BASE = os.path.join(BASE, 'gmscore_v10') |
| 22 | V10_PREFIX = os.path.join(V10_BASE, 'GmsCore_prod_alldpi_release_all_locales') |
Stephan Herhut | a07e5ff | 2017-07-07 10:53:12 +0200 | [diff] [blame] | 23 | |
| 24 | LATEST_BASE = os.path.join(BASE, 'latest') |
| 25 | LATEST_PREFIX = os.path.join(LATEST_BASE, 'GmsCore_prod_alldpi_release_all_locales') |
Yohann Roussel | 49e54a1 | 2017-06-23 18:08:07 +0200 | [diff] [blame] | 26 | ANDROID_L_API = '21' |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 27 | |
| 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. |
| 30 | ANDROID_JAR = os.path.join(THIRD_PARTY, 'android_jar', 'lib-v25', 'android.jar') |
| 31 | |
| 32 | VERSIONS = { |
| 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 Zerny | 877c186 | 2017-07-06 11:12:26 +0200 | [diff] [blame] | 39 | 'min-api' : ANDROID_L_API, |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 40 | } |
| 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 Zerny | 877c186 | 2017-07-06 11:12:26 +0200 | [diff] [blame] | 48 | 'min-api' : ANDROID_L_API, |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 49 | } |
| 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 Zerny | 877c186 | 2017-07-06 11:12:26 +0200 | [diff] [blame] | 57 | 'min-api' : ANDROID_L_API, |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 58 | } |
| 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 Zerny | 877c186 | 2017-07-06 11:12:26 +0200 | [diff] [blame] | 66 | 'min-api' : ANDROID_L_API, |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 67 | } |
| 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 Zerny | 877c186 | 2017-07-06 11:12:26 +0200 | [diff] [blame] | 75 | 'min-api' : ANDROID_L_API, |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 76 | } |
| 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 Zerny | 877c186 | 2017-07-06 11:12:26 +0200 | [diff] [blame] | 84 | 'min-api' : ANDROID_L_API, |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 85 | }, |
| 86 | 'deploy' : { |
| 87 | 'pgconf': ['%s_proguard.config' % V9_PREFIX], |
Yohann Roussel | 49e54a1 | 2017-06-23 18:08:07 +0200 | [diff] [blame] | 88 | 'inputs': ['%s_deploy.jar' % V9_PREFIX], |
Ian Zerny | 877c186 | 2017-07-06 11:12:26 +0200 | [diff] [blame] | 89 | 'min-api' : ANDROID_L_API, |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 90 | }, |
| 91 | 'proguarded' : { |
| 92 | 'inputs': ['%s_proguard.jar' % V9_PREFIX], |
Lars Bak | 9bee2d8 | 2017-08-23 11:00:04 +0200 | [diff] [blame] | 93 | 'main-dex-list': os.path.join(V9_BASE, 'main_dex_list.txt'), |
Yohann Roussel | 49e54a1 | 2017-06-23 18:08:07 +0200 | [diff] [blame] | 94 | 'pgmap': '%s_proguard.map' % V9_PREFIX, |
Ian Zerny | 877c186 | 2017-07-06 11:12:26 +0200 | [diff] [blame] | 95 | 'min-api' : ANDROID_L_API, |
Yohann Roussel | 49e54a1 | 2017-06-23 18:08:07 +0200 | [diff] [blame] | 96 | } |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 97 | }, |
| 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 Zerny | 877c186 | 2017-07-06 11:12:26 +0200 | [diff] [blame] | 104 | 'min-api' : ANDROID_L_API, |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 105 | }, |
| 106 | 'deploy' : { |
| 107 | 'inputs': ['%s_deploy.jar' % V10_PREFIX], |
| 108 | 'pgconf': ['%s_proguard.config' % V10_PREFIX], |
Ian Zerny | 877c186 | 2017-07-06 11:12:26 +0200 | [diff] [blame] | 109 | 'min-api' : ANDROID_L_API, |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 110 | }, |
| 111 | 'proguarded' : { |
| 112 | 'inputs': ['%s_proguard.jar' % V10_PREFIX], |
Lars Bak | 9bee2d8 | 2017-08-23 11:00:04 +0200 | [diff] [blame] | 113 | 'main-dex-list': os.path.join(V10_BASE, 'main_dex_list.txt') , |
Yohann Roussel | 49e54a1 | 2017-06-23 18:08:07 +0200 | [diff] [blame] | 114 | 'pgmap': '%s_proguard.map' % V10_PREFIX, |
Ian Zerny | 877c186 | 2017-07-06 11:12:26 +0200 | [diff] [blame] | 115 | 'min-api' : ANDROID_L_API, |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 116 | } |
| 117 | }, |
Stephan Herhut | a07e5ff | 2017-07-07 10:53:12 +0200 | [diff] [blame] | 118 | 'latest': { |
| 119 | 'deploy' : { |
| 120 | 'inputs': ['%s_deploy.jar' % LATEST_PREFIX], |
Stephan Herhut | 35ab223 | 2017-07-10 13:45:27 +0200 | [diff] [blame] | 121 | 'pgconf': [ |
| 122 | '%s_proguard.config' % LATEST_PREFIX, |
| 123 | '%s/proguardsettings/GmsCore_proguard.config' % THIRD_PARTY], |
Stephan Herhut | 0e135c8 | 2017-07-07 13:37:08 +0200 | [diff] [blame] | 124 | 'min-api' : ANDROID_L_API, |
Stephan Herhut | a07e5ff | 2017-07-07 10:53:12 +0200 | [diff] [blame] | 125 | }, |
Tamas Kenez | aeb314a | 2017-08-23 13:42:55 +0200 | [diff] [blame] | 126 | 'proguarded' : { |
| 127 | 'inputs': ['%s_proguard.jar' % LATEST_PREFIX], |
Tamas Kenez | 228870b | 2017-08-23 13:53:22 +0200 | [diff] [blame] | 128 | 'main-dex-list': os.path.join(LATEST_BASE, 'main_dex_list.txt') , |
Tamas Kenez | aeb314a | 2017-08-23 13:42:55 +0200 | [diff] [blame] | 129 | 'pgmap': '%s_proguard.map' % LATEST_PREFIX, |
| 130 | 'min-api' : ANDROID_L_API, |
| 131 | } |
Stephan Herhut | a07e5ff | 2017-07-07 10:53:12 +0200 | [diff] [blame] | 132 | }, |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 133 | } |