blob: 0dec0316bdf8beece98ab48cfd1ab27d1f641228 [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
Yohann Roussel49e54a12017-06-23 18:08:07 +02008ANDROID_L_API = '21'
Christoffer Quist Adamsen62fcc152022-06-03 14:01:35 +02009ANDROID_M_API = '23'
10
Rico Wind6238f222018-10-03 10:36:10 +020011BASE = os.path.join(utils.THIRD_PARTY, 'youtube')
Mads Ager418d1ca2017-05-22 09:35:49 +020012
Christoffer Quist Adamsene18f9202021-05-31 13:14:20 +020013V16_20_BASE = os.path.join(BASE, 'youtube.android_16.20')
14V16_20_PREFIX = os.path.join(V16_20_BASE, 'YouTubeRelease')
15
Christoffer Quist Adamsen62fcc152022-06-03 14:01:35 +020016V17_19_BASE = os.path.join(BASE, 'youtube.android_17.19')
17V17_19_PREFIX = os.path.join(V17_19_BASE, 'YouTubeRelease')
18
19LATEST_VERSION = '17.19'
Mads Ager418d1ca2017-05-22 09:35:49 +020020
21VERSIONS = {
Christoffer Quist Adamsene18f9202021-05-31 13:14:20 +020022 '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 Adamsen62fcc152022-06-03 14:01:35 +020053 '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 Adamsenb02372b2022-06-07 08:22:49 +020068 # TODO(b/235169948): Reenable -checkenumunboxed.
69 # '-Dcom.android.tools.r8.experimental.enablecheckenumunboxed=1',
Christoffer Quist Adamsen62fcc152022-06-03 14:01:35 +020070 '-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 Ager418d1ca2017-05-22 09:35:49 +020084}
Christoffer Quist Adamsen81d41502021-06-25 09:33:43 +020085
86def GetLatestVersion():
87 return LATEST_VERSION
88
89def GetName():
90 return 'youtube'
91
92def GetMemoryData(version):
93 assert version == '16.20'
94 return {
Morten Krogh-Jespersen1d5c4ea2021-08-26 08:11:18 +020095 'find-xmx-min': 3150,
Morten Krogh-Jespersend7f16202021-08-23 09:41:52 +020096 'find-xmx-max': 3300,
Christoffer Quist Adamsen81d41502021-06-25 09:33:43 +020097 'find-xmx-range': 64,
Morten Krogh-Jespersend7f16202021-08-23 09:41:52 +020098 'oom-threshold': 3100,
Christoffer Quist Adamsen81d41502021-06-25 09:33:43 +020099 # TODO(b/143431825): Youtube can OOM randomly in memory configurations
100 # that should work.
101 'skip-find-xmx-max': True,
102 }