blob: 37385c86b2306f4d32f22038955879514a3bf8ae [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
Mads Ager418d1ca2017-05-22 09:35:49 +02005import os
6import utils
7
Christoffer Quist Adamsen62fcc152022-06-03 14:01:35 +02008ANDROID_M_API = '23'
9
Rico Wind6238f222018-10-03 10:36:10 +020010BASE = os.path.join(utils.THIRD_PARTY, 'youtube')
Mads Ager418d1ca2017-05-22 09:35:49 +020011
Christoffer Quist Adamsen62fcc152022-06-03 14:01:35 +020012V17_19_BASE = os.path.join(BASE, 'youtube.android_17.19')
13V17_19_PREFIX = os.path.join(V17_19_BASE, 'YouTubeRelease')
14
15LATEST_VERSION = '17.19'
Mads Ager418d1ca2017-05-22 09:35:49 +020016
17VERSIONS = {
Christoffer Quist Adamsen2434a4d2023-10-16 11:29:03 +020018 '17.19': {
19 'deploy': {
20 'sanitize_libraries': False,
21 'inputs': ['%s_deploy.jar' % V17_19_PREFIX],
22 'libraries': [
23 os.path.join(
24 V17_19_BASE,
25 'legacy_YouTubeRelease_combined_library_jars_filtered.jar')
26 ],
27 'pgconf': [
28 '%s_proguard.config' % V17_19_PREFIX,
29 '%s_proguard_extra.config' % V17_19_PREFIX,
30 '%s/proguardsettings/YouTubeRelease_proguard.config' %
31 utils.THIRD_PARTY, utils.IGNORE_WARNINGS_RULES
32 ],
33 'min-api': ANDROID_M_API,
34 'system-properties': [
35 # TODO(b/235169948): Reenable -checkenumunboxed.
36 # '-Dcom.android.tools.r8.experimental.enablecheckenumunboxed=1',
37 '-Dcom.android.tools.r8.experimental.enableconvertchecknotnull=1'
38 ],
39 'android_java8_libs': {
40 'config':
41 '%s/desugar_jdk_libs/full_desugar_jdk_libs.json' %
42 V17_19_BASE,
43 # Intentionally not adding desugar_jdk_libs_configuration.jar since it
44 # is part of jdk_libs_to_desugar.jar in YouTube 17.19.
45 'program': [
46 '%s/desugar_jdk_libs/jdk_libs_to_desugar.jar' % V17_19_BASE
47 ],
48 'library':
49 '%s/android_jar/lib-v33/android.jar' % utils.THIRD_PARTY,
50 'pgconf': [
51 '%s/desugar_jdk_libs/base.pgcfg' % V17_19_BASE,
52 '%s/desugar_jdk_libs/minify_desugar_jdk_libs.pgcfg' %
53 V17_19_BASE
54 ]
55 }
56 },
Christoffer Quist Adamsen62fcc152022-06-03 14:01:35 +020057 },
Mads Ager418d1ca2017-05-22 09:35:49 +020058}
Christoffer Quist Adamsen81d41502021-06-25 09:33:43 +020059
Christoffer Quist Adamsen2434a4d2023-10-16 11:29:03 +020060
Christoffer Quist Adamsen81d41502021-06-25 09:33:43 +020061def GetLatestVersion():
Christoffer Quist Adamsen2434a4d2023-10-16 11:29:03 +020062 return LATEST_VERSION
63
Christoffer Quist Adamsen81d41502021-06-25 09:33:43 +020064
65def GetName():
Christoffer Quist Adamsen2434a4d2023-10-16 11:29:03 +020066 return 'youtube'
67
Christoffer Quist Adamsen81d41502021-06-25 09:33:43 +020068
69def GetMemoryData(version):
Christoffer Quist Adamsen2434a4d2023-10-16 11:29:03 +020070 assert version == '16.20'
71 return {
72 'find-xmx-min': 3150,
73 'find-xmx-max': 3300,
74 'find-xmx-range': 64,
75 'oom-threshold': 3100,
76 # TODO(b/143431825): Youtube can OOM randomly in memory configurations
77 # that should work.
78 'skip-find-xmx-max': True,
79 }