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 | |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 5 | import os |
| 6 | import utils |
| 7 | |
Yohann Roussel | 49e54a1 | 2017-06-23 18:08:07 +0200 | [diff] [blame] | 8 | ANDROID_L_API = '21' |
Christoffer Quist Adamsen | 62fcc15 | 2022-06-03 14:01:35 +0200 | [diff] [blame] | 9 | ANDROID_M_API = '23' |
| 10 | |
Rico Wind | 6238f22 | 2018-10-03 10:36:10 +0200 | [diff] [blame] | 11 | BASE = os.path.join(utils.THIRD_PARTY, 'youtube') |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 12 | |
Christoffer Quist Adamsen | e18f920 | 2021-05-31 13:14:20 +0200 | [diff] [blame] | 13 | V16_20_BASE = os.path.join(BASE, 'youtube.android_16.20') |
| 14 | V16_20_PREFIX = os.path.join(V16_20_BASE, 'YouTubeRelease') |
| 15 | |
Christoffer Quist Adamsen | 62fcc15 | 2022-06-03 14:01:35 +0200 | [diff] [blame] | 16 | V17_19_BASE = os.path.join(BASE, 'youtube.android_17.19') |
| 17 | V17_19_PREFIX = os.path.join(V17_19_BASE, 'YouTubeRelease') |
| 18 | |
| 19 | LATEST_VERSION = '17.19' |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 20 | |
| 21 | VERSIONS = { |
Christoffer Quist Adamsen | e18f920 | 2021-05-31 13:14:20 +0200 | [diff] [blame] | 22 | '16.20': { |
| 23 | 'deploy' : { |
| 24 | 'sanitize_libraries': False, |
| 25 | 'inputs': ['%s_deploy.jar' % V16_20_PREFIX], |
| 26 | 'libraries' : [ |
| 27 | os.path.join( |
| 28 | V16_20_BASE, |
| 29 | 'legacy_YouTubeRelease_combined_library_jars_filtered.jar')], |
| 30 | 'pgconf': [ |
| 31 | '%s_proguard.config' % V16_20_PREFIX, |
| 32 | '%s/proguardsettings/YouTubeRelease_proguard.config' % utils.THIRD_PARTY, |
| 33 | utils.IGNORE_WARNINGS_RULES], |
| 34 | 'min-api' : ANDROID_L_API, |
| 35 | 'android_java8_libs': { |
| 36 | 'config': '%s/desugar_jdk_libs/full_desugar_jdk_libs.json' % V16_20_BASE, |
| 37 | # Intentionally not adding desugar_jdk_libs_configuration.jar since it |
| 38 | # is part of jdk_libs_to_desugar.jar in YouTube 16.20. |
| 39 | 'program': ['%s/desugar_jdk_libs/jdk_libs_to_desugar.jar' % V16_20_BASE], |
| 40 | 'library': '%s/android_jar/lib-v30/android.jar' % utils.THIRD_PARTY, |
| 41 | 'pgconf': [ |
| 42 | '%s/desugar_jdk_libs/base.pgcfg' % V16_20_BASE, |
| 43 | '%s/desugar_jdk_libs/minify_desugar_jdk_libs.pgcfg' % V16_20_BASE |
| 44 | ] |
| 45 | } |
| 46 | }, |
| 47 | 'proguarded' : { |
| 48 | 'inputs': ['%s_proguard.jar' % V16_20_PREFIX], |
| 49 | 'pgmap': '%s_proguard.map' % V16_20_PREFIX, |
| 50 | 'min-api' : ANDROID_L_API, |
| 51 | } |
| 52 | }, |
Christoffer Quist Adamsen | 62fcc15 | 2022-06-03 14:01:35 +0200 | [diff] [blame] | 53 | '17.19': { |
| 54 | 'deploy' : { |
| 55 | 'sanitize_libraries': False, |
| 56 | 'inputs': ['%s_deploy.jar' % V17_19_PREFIX], |
| 57 | 'libraries' : [ |
| 58 | os.path.join( |
| 59 | V17_19_BASE, |
| 60 | 'legacy_YouTubeRelease_combined_library_jars_filtered.jar')], |
| 61 | 'pgconf': [ |
| 62 | '%s_proguard.config' % V17_19_PREFIX, |
| 63 | '%s_proguard_extra.config' % V17_19_PREFIX, |
| 64 | '%s/proguardsettings/YouTubeRelease_proguard.config' % utils.THIRD_PARTY, |
| 65 | utils.IGNORE_WARNINGS_RULES], |
| 66 | 'min-api' : ANDROID_M_API, |
| 67 | 'system-properties': [ |
Christoffer Quist Adamsen | b02372b | 2022-06-07 08:22:49 +0200 | [diff] [blame] | 68 | # TODO(b/235169948): Reenable -checkenumunboxed. |
| 69 | # '-Dcom.android.tools.r8.experimental.enablecheckenumunboxed=1', |
Christoffer Quist Adamsen | 62fcc15 | 2022-06-03 14:01:35 +0200 | [diff] [blame] | 70 | '-Dcom.android.tools.r8.experimental.enableconvertchecknotnull=1'], |
| 71 | 'android_java8_libs': { |
| 72 | 'config': '%s/desugar_jdk_libs/full_desugar_jdk_libs.json' % V17_19_BASE, |
| 73 | # Intentionally not adding desugar_jdk_libs_configuration.jar since it |
| 74 | # is part of jdk_libs_to_desugar.jar in YouTube 17.19. |
| 75 | 'program': ['%s/desugar_jdk_libs/jdk_libs_to_desugar.jar' % V17_19_BASE], |
| 76 | 'library': '%s/android_jar/lib-v33/android.jar' % utils.THIRD_PARTY, |
| 77 | 'pgconf': [ |
| 78 | '%s/desugar_jdk_libs/base.pgcfg' % V17_19_BASE, |
| 79 | '%s/desugar_jdk_libs/minify_desugar_jdk_libs.pgcfg' % V17_19_BASE |
| 80 | ] |
| 81 | } |
| 82 | }, |
| 83 | }, |
Mads Ager | 418d1ca | 2017-05-22 09:35:49 +0200 | [diff] [blame] | 84 | } |
Christoffer Quist Adamsen | 81d4150 | 2021-06-25 09:33:43 +0200 | [diff] [blame] | 85 | |
| 86 | def GetLatestVersion(): |
| 87 | return LATEST_VERSION |
| 88 | |
| 89 | def GetName(): |
| 90 | return 'youtube' |
| 91 | |
| 92 | def GetMemoryData(version): |
| 93 | assert version == '16.20' |
| 94 | return { |
Morten Krogh-Jespersen | 1d5c4ea | 2021-08-26 08:11:18 +0200 | [diff] [blame] | 95 | 'find-xmx-min': 3150, |
Morten Krogh-Jespersen | d7f1620 | 2021-08-23 09:41:52 +0200 | [diff] [blame] | 96 | 'find-xmx-max': 3300, |
Christoffer Quist Adamsen | 81d4150 | 2021-06-25 09:33:43 +0200 | [diff] [blame] | 97 | 'find-xmx-range': 64, |
Morten Krogh-Jespersen | d7f1620 | 2021-08-23 09:41:52 +0200 | [diff] [blame] | 98 | 'oom-threshold': 3100, |
Christoffer Quist Adamsen | 81d4150 | 2021-06-25 09:33:43 +0200 | [diff] [blame] | 99 | # TODO(b/143431825): Youtube can OOM randomly in memory configurations |
| 100 | # that should work. |
| 101 | 'skip-find-xmx-max': True, |
| 102 | } |