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 5import glob 6import os 7import utils 8 9THIRD_PARTY = os.path.join(utils.REPO_ROOT, 'third_party') 10ANDROID_L_API = '21' 11BASE = os.path.join(THIRD_PARTY, 'youtube') 12 13V12_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 19V12_22_BASE = os.path.join(BASE, 'youtube.android_12.22') 20V12_22_PREFIX = os.path.join(V12_22_BASE, 'YouTubeRelease') 21 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. 24ANDROID_JAR = os.path.join(THIRD_PARTY, 'android_jar', 'lib-v25', 'android.jar') 25 26VERSIONS = { 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', 33 'min-api' : ANDROID_L_API, 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], 39 'min-api' : ANDROID_L_API, 40 }, 41 'proguarded' : { 42 'inputs': ['%s_proguard.jar' % V12_10_PREFIX], 43 'pgmap': '%s_proguard.map' % V12_10_PREFIX, 44 'min-api' : ANDROID_L_API, 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', 53 'min-api' : ANDROID_L_API, 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], 59 'min-api' : ANDROID_L_API, 60 }, 61 'proguarded' : { 62 'inputs': ['%s_proguard.jar' % V12_17_PREFIX], 63 'pgmap': '%s_proguard.map' % V12_17_PREFIX, 64 'min-api' : ANDROID_L_API, 65 } 66 }, 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', 73 'min-api' : ANDROID_L_API, 74 }, 75 'deploy' : { 76 'inputs': ['%s_deploy.jar' % V12_22_PREFIX], 77 'pgconf': [ 78 '%s_proguard.config' % V12_22_PREFIX, 79 '%s/proguardsettings/YouTubeRelease_proguard.config' % THIRD_PARTY], 80 'multidexrules' : [ 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')], 84 }, 85 'proguarded' : { 86 'inputs': ['%s_proguard.jar' % V12_22_PREFIX], 87 'pgmap': '%s_proguard.map' % V12_22_PREFIX, 88 'min-api' : ANDROID_L_API, 89 } 90 }, 91} 92