blob: 114e6c72342542ba7512530631285199e7a40679 [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')
Yohann Roussel49e54a12017-06-23 18:08:07 +020010ANDROID_L_API = '21'
Mads Ager418d1ca2017-05-22 09:35:49 +020011BASE = os.path.join(THIRD_PARTY, 'youtube')
12
Mads Ager418d1ca2017-05-22 09:35:49 +020013V12_10_BASE = os.path.join(BASE, 'youtube.android_12.10')
14V12_10_PREFIX = os.path.join(V12_10_BASE, 'YouTubeRelease')
15
16V12_17_BASE = os.path.join(BASE, 'youtube.android_12.17')
17V12_17_PREFIX = os.path.join(V12_17_BASE, 'YouTubeRelease')
18
Søren Gjessecc33fb42017-06-09 10:25:08 +020019V12_22_BASE = os.path.join(BASE, 'youtube.android_12.22')
20V12_22_PREFIX = os.path.join(V12_22_BASE, 'YouTubeRelease')
21
Mads Ager418d1ca2017-05-22 09:35:49 +020022# 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.
24ANDROID_JAR = os.path.join(THIRD_PARTY, 'android_jar', 'lib-v25', 'android.jar')
25
26VERSIONS = {
Mads Ager418d1ca2017-05-22 09:35:49 +020027 '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 Zerny877c1862017-07-06 11:12:26 +020033 'min-api' : ANDROID_L_API,
Mads Ager418d1ca2017-05-22 09:35:49 +020034 },
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 Zerny877c1862017-07-06 11:12:26 +020039 'min-api' : ANDROID_L_API,
Mads Ager418d1ca2017-05-22 09:35:49 +020040 },
41 'proguarded' : {
42 'inputs': ['%s_proguard.jar' % V12_10_PREFIX],
Yohann Roussel49e54a12017-06-23 18:08:07 +020043 'pgmap': '%s_proguard.map' % V12_10_PREFIX,
Ian Zerny877c1862017-07-06 11:12:26 +020044 'min-api' : ANDROID_L_API,
Mads Ager418d1ca2017-05-22 09:35:49 +020045 }
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 Zerny877c1862017-07-06 11:12:26 +020053 'min-api' : ANDROID_L_API,
Mads Ager418d1ca2017-05-22 09:35:49 +020054 },
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 Zerny877c1862017-07-06 11:12:26 +020059 'min-api' : ANDROID_L_API,
Mads Ager418d1ca2017-05-22 09:35:49 +020060 },
61 'proguarded' : {
62 'inputs': ['%s_proguard.jar' % V12_17_PREFIX],
Yohann Roussel49e54a12017-06-23 18:08:07 +020063 'pgmap': '%s_proguard.map' % V12_17_PREFIX,
Ian Zerny877c1862017-07-06 11:12:26 +020064 'min-api' : ANDROID_L_API,
Mads Ager418d1ca2017-05-22 09:35:49 +020065 }
66 },
Søren Gjessecc33fb42017-06-09 10:25:08 +020067 '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 Zerny877c1862017-07-06 11:12:26 +020073 'min-api' : ANDROID_L_API,
Søren Gjessecc33fb42017-06-09 10:25:08 +020074 },
75 'deploy' : {
76 'inputs': ['%s_deploy.jar' % V12_22_PREFIX],
Søren Gjessef1bc41e2017-06-19 16:33:16 +020077 'pgconf': [
78 '%s_proguard.config' % V12_22_PREFIX,
79 '%s/proguardsettings/YouTubeRelease_proguard.config' % THIRD_PARTY],
Søren Gjessec801ecc2017-08-03 13:40:06 +020080 'maindexrules' : [
Søren Gjessef1bc41e2017-06-19 16:33:16 +020081 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 Gjessecc33fb42017-06-09 10:25:08 +020084 },
85 'proguarded' : {
86 'inputs': ['%s_proguard.jar' % V12_22_PREFIX],
Yohann Roussel49e54a12017-06-23 18:08:07 +020087 'pgmap': '%s_proguard.map' % V12_22_PREFIX,
Ian Zerny877c1862017-07-06 11:12:26 +020088 'min-api' : ANDROID_L_API,
Søren Gjessecc33fb42017-06-09 10:25:08 +020089 }
90 },
Mads Ager418d1ca2017-05-22 09:35:49 +020091}