-
Notifications
You must be signed in to change notification settings - Fork 766
/
BUCK
137 lines (126 loc) · 3.3 KB
/
BUCK
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# Copyright (c) 2017-present, Facebook, Inc.
#
# This source code is licensed under the Apache 2.0 license found in the
# LICENSE file in the root directory of this source tree.
load("@fbsource//xplat/pfh/FBApp_UIFrameworks_Litho_Litho:DEFS.bzl", "FBApp_UIFrameworks_Litho_Litho")
load("//tools/build_defs/oss:fb_native_wrapper.bzl", "fb_native")
load(
"//tools/build_defs/oss:litho_defs.bzl",
"LITHO_BUILD_CONFIG_TARGET",
"LITHO_COMPONENTS_TARGET_VISIBILITY",
"LITHO_COROUTINES_KOTLIN_TARGET",
"LITHO_JAVA_TARGET",
"LITHO_PERF_LOGGER",
"LITHO_SECTIONS_ANNOTATIONS_TARGET",
"LITHO_SECTIONS_COMMON_TARGET",
"LITHO_SECTIONS_TARGET",
"LITHO_SECTIONS_WIDGET_TARGET",
"LITHO_TOOLING",
"LITHO_VISIBILITY",
"LITHO_WIDGET_TARGET",
"LITHO_YOGA_TARGET",
"fb_core_android_library",
"litho_android_library",
)
oncall("playgroundapps")
litho_android_library(
name = "components",
autoglob = False,
language = "JAVA",
manifest = "AndroidManifest.xml",
visibility = LITHO_COMPONENTS_TARGET_VISIBILITY,
deps = [
LITHO_BUILD_CONFIG_TARGET,
],
exported_deps = [
LITHO_JAVA_TARGET,
LITHO_YOGA_TARGET,
"//third-party/java/androidx/annotation/annotation:annotation",
"//third-party/java/androidx/core/core:core",
"//third-party/java/androidx/fragment/fragment:fragment",
],
)
litho_android_library(
name = "sections_core",
autoglob = False,
language = "JAVA",
visibility = [
"PUBLIC",
],
exported_deps = [
":components",
LITHO_SECTIONS_ANNOTATIONS_TARGET,
LITHO_SECTIONS_TARGET,
],
)
litho_android_library(
name = "litho_tooling",
autoglob = False,
visibility = [
"PUBLIC",
],
exported_deps = [
LITHO_TOOLING,
LITHO_JAVA_TARGET,
],
)
litho_android_library(
name = "litho_coroutines_kotlin",
autoglob = False,
language = "JAVA",
visibility = [
"PUBLIC",
],
exported_deps = [
LITHO_COROUTINES_KOTLIN_TARGET,
],
)
litho_android_library(
name = "litho_perf_logger",
feature = FBApp_UIFrameworks_Litho_Litho,
required_for_source_only_abi = True,
visibility = ["PUBLIC"],
exported_deps = [
LITHO_PERF_LOGGER,
],
)
fb_core_android_library(
name = "sections",
feature = FBApp_UIFrameworks_Litho_Litho,
labels = [],
visibility = [
"PUBLIC",
],
exported_deps = [
":sections_no_codegen",
],
)
# Same as "sections", but without triggering the codegen
fb_core_android_library(
name = "sections_no_codegen",
feature = FBApp_UIFrameworks_Litho_Litho,
labels = [],
visibility = [
"PUBLIC",
],
exported_deps = [
":sections_core",
LITHO_SECTIONS_COMMON_TARGET,
LITHO_SECTIONS_WIDGET_TARGET,
LITHO_WIDGET_TARGET,
],
)
fb_native.android_build_config(
name = "build_config",
package = "com.facebook.litho",
values_file = ":build_config_values",
visibility = LITHO_VISIBILITY,
)
fb_native.genrule(
name = "build_config_values",
srcs = [
"config/build_config_values",
],
out = "extra_build_config_values",
cmd = "SRCARR=($SRCS); cat ${SRCARR[0]} | sed 's/{{IS_DEBUG}}/%s/' > $OUT" % read_config("litho", "is_debug", "true"),
)