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') |
Yohann Roussel | 49e54a1 | 2017-06-23 18:08:07 +0200 | [diff] [blame] | 10 | ANDROID_L_API = '21' |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 11 | BASE = os.path.join(THIRD_PARTY, 'youtube') |
| 12 | |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 13 | V12_10_BASE = os.path.join(BASE, 'youtube.android_12.10') |
| 14 | V12_10_PREFIX = os.path.join(V12_10_BASE, 'YouTubeRelease') |
| 15 | |
| 16 | V12_17_BASE = os.path.join(BASE, 'youtube.android_12.17') |
| 17 | V12_17_PREFIX = os.path.join(V12_17_BASE, 'YouTubeRelease') |
| 18 | |
Søren Gjesse | cc33fb4 | 2017-06-09 10:25:08 +0200 | [diff] [blame] | 19 | V12_22_BASE = os.path.join(BASE, 'youtube.android_12.22') |
| 20 | V12_22_PREFIX = os.path.join(V12_22_BASE, 'YouTubeRelease') |
| 21 | |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 22 | # NOTE: we always use android.jar for SDK v25, later we might want to revise it |
| 23 | # to use proper android.jar version for each of youtube version separately. |
| 24 | ANDROID_JAR = os.path.join(THIRD_PARTY, 'android_jar', 'lib-v25', 'android.jar') |
| 25 | |
| 26 | VERSIONS = { |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 27 | '12.10': { |
| 28 | 'dex' : { |
| 29 | 'inputs': [os.path.join(V12_10_BASE, 'YouTubeRelease_unsigned.apk')], |
| 30 | 'pgmap': '%s_proguard.map' % V12_10_PREFIX, |
| 31 | 'libraries' : [ANDROID_JAR], |
| 32 | 'r8-flags': '--ignore-missing-classes', |
Ian Zerny | 877c186 | 2017-07-06 11:12:26 +0200 | [diff] [blame] | 33 | 'min-api' : ANDROID_L_API, |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 34 | }, |
| 35 | 'deploy' : { |
| 36 | 'inputs': ['%s_deploy.jar' % V12_10_PREFIX], |
| 37 | 'pgconf': ['%s_proguard.config' % V12_10_PREFIX, |
| 38 | '%s/proguardsettings/YouTubeRelease_proguard.config' % THIRD_PARTY], |
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 | 'proguarded' : { |
| 42 | 'inputs': ['%s_proguard.jar' % V12_10_PREFIX], |
Yohann Roussel | 49e54a1 | 2017-06-23 18:08:07 +0200 | [diff] [blame] | 43 | 'pgmap': '%s_proguard.map' % V12_10_PREFIX, |
Ian Zerny | 877c186 | 2017-07-06 11:12:26 +0200 | [diff] [blame] | 44 | 'min-api' : ANDROID_L_API, |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 45 | } |
| 46 | }, |
| 47 | '12.17': { |
| 48 | 'dex' : { |
| 49 | 'inputs': [os.path.join(V12_17_BASE, 'YouTubeRelease_unsigned.apk')], |
| 50 | 'pgmap': '%s_proguard.map' % V12_17_PREFIX, |
| 51 | 'libraries' : [ANDROID_JAR], |
| 52 | 'r8-flags': '--ignore-missing-classes', |
Ian Zerny | 877c186 | 2017-07-06 11:12:26 +0200 | [diff] [blame] | 53 | 'min-api' : ANDROID_L_API, |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 54 | }, |
| 55 | 'deploy' : { |
| 56 | 'inputs': ['%s_deploy.jar' % V12_17_PREFIX], |
| 57 | 'pgconf': ['%s_proguard.config' % V12_17_PREFIX, |
| 58 | '%s/proguardsettings/YouTubeRelease_proguard.config' % THIRD_PARTY], |
Ian Zerny | 877c186 | 2017-07-06 11:12:26 +0200 | [diff] [blame] | 59 | 'min-api' : ANDROID_L_API, |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 60 | }, |
| 61 | 'proguarded' : { |
| 62 | 'inputs': ['%s_proguard.jar' % V12_17_PREFIX], |
Yohann Roussel | 49e54a1 | 2017-06-23 18:08:07 +0200 | [diff] [blame] | 63 | 'pgmap': '%s_proguard.map' % V12_17_PREFIX, |
Ian Zerny | 877c186 | 2017-07-06 11:12:26 +0200 | [diff] [blame] | 64 | 'min-api' : ANDROID_L_API, |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 65 | } |
| 66 | }, |
Søren Gjesse | cc33fb4 | 2017-06-09 10:25:08 +0200 | [diff] [blame] | 67 | '12.22': { |
| 68 | 'dex' : { |
| 69 | 'inputs': [os.path.join(V12_22_BASE, 'YouTubeRelease_unsigned.apk')], |
| 70 | 'pgmap': '%s_proguard.map' % V12_22_PREFIX, |
| 71 | 'libraries' : [ANDROID_JAR], |
| 72 | 'r8-flags': '--ignore-missing-classes', |
Ian Zerny | 877c186 | 2017-07-06 11:12:26 +0200 | [diff] [blame] | 73 | 'min-api' : ANDROID_L_API, |
Søren Gjesse | cc33fb4 | 2017-06-09 10:25:08 +0200 | [diff] [blame] | 74 | }, |
| 75 | 'deploy' : { |
| 76 | 'inputs': ['%s_deploy.jar' % V12_22_PREFIX], |
Søren Gjesse | f1bc41e | 2017-06-19 16:33:16 +0200 | [diff] [blame] | 77 | 'pgconf': [ |
| 78 | '%s_proguard.config' % V12_22_PREFIX, |
| 79 | '%s/proguardsettings/YouTubeRelease_proguard.config' % THIRD_PARTY], |
Søren Gjesse | c801ecc | 2017-08-03 13:40:06 +0200 | [diff] [blame] | 80 | 'maindexrules' : [ |
Søren Gjesse | f1bc41e | 2017-06-19 16:33:16 +0200 | [diff] [blame] | 81 | os.path.join(V12_22_BASE, 'mainDexClasses.rules'), |
| 82 | os.path.join(V12_22_BASE, 'main-dex-classes-release.cfg'), |
| 83 | os.path.join(V12_22_BASE, 'main_dex_YouTubeRelease_proguard.cfg')], |
Søren Gjesse | cc33fb4 | 2017-06-09 10:25:08 +0200 | [diff] [blame] | 84 | }, |
| 85 | 'proguarded' : { |
| 86 | 'inputs': ['%s_proguard.jar' % V12_22_PREFIX], |
Yohann Roussel | 49e54a1 | 2017-06-23 18:08:07 +0200 | [diff] [blame] | 87 | 'pgmap': '%s_proguard.map' % V12_22_PREFIX, |
Ian Zerny | 877c186 | 2017-07-06 11:12:26 +0200 | [diff] [blame] | 88 | 'min-api' : ANDROID_L_API, |
Søren Gjesse | cc33fb4 | 2017-06-09 10:25:08 +0200 | [diff] [blame] | 89 | } |
| 90 | }, |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 91 | } |