forked from oppia/oppia-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config_proto_assets.bzl
30 lines (26 loc) · 1.05 KB
/
config_proto_assets.bzl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
"""
Macro for generating proto assets for app-wide configurations.
"""
load("//model:text_proto_assets.bzl", "generate_proto_binary_assets")
def generate_supported_languages_configuration_from_text_proto(
name,
supported_language_text_proto_file_name):
"""
Converts multiple lists of text proto assets to binary.
Args:
name: str. The name of this generation instance. This will be a prefix for derived targets.
supported_language_text_proto_file_name: target. The target corresponding to the text proto
defining the list of supported languages in the app.
Returns:
list of str. The list of new proto binary asset files that were generated.
"""
return generate_proto_binary_assets(
name = name,
names = [supported_language_text_proto_file_name],
proto_dep_name = "languages",
proto_type_name = "SupportedLanguages",
name_prefix = name,
asset_dir = "languages",
proto_dep_bazel_target_prefix = "//model",
proto_package = "model",
)