forked from facebook/litho
-
Notifications
You must be signed in to change notification settings - Fork 0
/
COMPONENTS_DEFS
111 lines (94 loc) · 6.01 KB
/
COMPONENTS_DEFS
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
COMPONENTS_ROOT = '//'
COMPONENTS_VISIBILITY = 'PUBLIC'
COMPONENTS_IS_OSS_BUILD = True
def make_dep_path(pth):
return COMPONENTS_ROOT + pth
COMPONENTS_ROOT_TARGET = make_dep_path(":components")
# Java source
COMPONENTS_JAVA_TARGET = make_dep_path('litho-core/src/main/java/com/facebook/litho:components')
COMPONENTS_STETHO_JAVA_TARGET = make_dep_path('litho-stetho/src/main/java/com/facebook/litho:stetho')
COMPONENTS_ANNOTATIONS_TARGET = make_dep_path('litho-annotations/src/main/java/com/facebook/litho/annotations:annotations')
COMPONENTS_CONFIG_TARGET = make_dep_path('litho-core/src/main/java/com/facebook/litho/config:config')
COMPONENTS_DISPLAYLISTSTUBS_TARGET = make_dep_path('litho-stubs:stubs')
COMPONENTS_VIEWCOMPATCREATOR_TARGET = make_dep_path('litho-core/src/main/java/com/facebook/litho/viewcompatcreator:viewcompatcreator')
COMPONENTS_UTILS_TARGET = make_dep_path('litho-core/src/main/java/com/facebook/litho/utils:utils')
COMPONENTS_WIDGET_ACCESSIBILITIES_TARGET = make_dep_path('litho-widget/src/main/java/com/facebook/litho/widget/accessibility:accessibility')
COMPONENTS_WIDGET_TARGET = make_dep_path('litho-widget/src/main/java/com/facebook/litho/widget:widget')
COMPONENTS_COMPONENTS_FRESCO_TARGET = make_dep_path('litho-fresco/src/main/java/com/facebook/litho/fresco:fresco')
COMPONENTS_TESTING_TARGET = make_dep_path('litho-testing/src/main/java/com/facebook/litho/testing:testing')
COMPONENTS_TEST_RES = make_dep_path('litho-it/src/main:res')
# Test source
COMPONENTS_TEST_TARGET = make_dep_path('litho-it/src/test/java/com/facebook/litho:components')
# Java source with local upstream
COMPONENTS_PROGUARDANNOTATIONS_TARGET = make_dep_path('litho-annotations/src/main/java/com/facebook/proguard/annotations:annotations')
# Resources
COMPONENTS_RES_TARGET = make_dep_path(':res')
# Libraries
COMPONENTS_INFERANNOTATIONS_TARGET = make_dep_path('lib/infer-annotations:infer-annotations')
COMPONENTS_JSR_TARGET = make_dep_path('lib/jsr-305:jsr-305')
COMPONENTS_ANDROIDSUPPORT_TARGET = make_dep_path('lib/android-support:android-support')
COMPONENTS_ANDROIDSUPPORT_RECYCLERVIEW_TARGET = make_dep_path('lib/android-support:android-support-recyclerview')
COMPONENTS_ANDROIDSUPPORT_APPCOMPAT_TARGET = make_dep_path('lib/appcompat:appcompat')
COMPONENTS_YOGA_TARGET = make_dep_path('lib/yoga:yoga')
COMPONENTS_YOGAPREBUILT_TARGET = make_dep_path('lib/yoga:yoga-prebuilt')
COMPONENTS_BUILD_CONFIG_TARGET = make_dep_path(':build_config')
COMPONENTS_STETHO_TARGET = make_dep_path('lib/stetho:stetho')
COMPONENTS_COMMONS_CLI_TARGET = make_dep_path('lib/commons-cli:commons-cli')
COMPONENTS_TEXTLAYOUTBUILDER_TARGET = make_dep_path('lib/textlayoutbuilder:textlayoutbuilder')
COMPONENTS_JAVAPOET_TARGET = make_dep_path('lib/javapoet:javapoet')
COMPONENTS_FBCORE_TARGET = make_dep_path('lib/fbcore:fbcore')
COMPONENTS_SOLOADER_TARGET = make_dep_path('lib/soloader:soloader')
COMPONENTS_ASSERTJ_TARGET = make_dep_path('lib/assertj:assertj')
COMPONENTS_COMPILE_TESTING_TARGET = make_dep_path('lib/compile-testing:compile-testing')
COMPONENTS_MOCKITO_TARGET = make_dep_path('lib/mockito:mockito')
COMPONENTS_POWERMOCK_REFLECT_TARGET = make_dep_path('lib/powermock:powermock-reflect')
COMPONENTS_POWERMOCK_MOCKITO_TARGET = make_dep_path('lib/powermock:powermock-mockito')
COMPONENTS_JNI_TARGET = make_dep_path('lib/jni-hack:jni-hack')
COMPONENTS_FBJNI_TARGET = make_dep_path('lib/fbjni:jni')
COMPONENTS_GUAVA_TARGET = make_dep_path('lib/guava:guava')
COMPONENTS_DIFFUTILS_TARGET = make_dep_path('lib/diff-utils:diff-utils')
# Fresco
COMPONENTS_FRESCO_TARGET = make_dep_path('lib/fresco:fresco')
COMPONENTS_ROBOLECTRIC_TARGET = make_dep_path('lib/robolectric3:robolectric3')
COMPONENTS_JUNIT_TARGET = make_dep_path('lib/junit:junit')
# Annotation processors
COMPONENTS_PROCESSOR_TARGET = make_dep_path('litho-processor/src/main/java/com/facebook/litho/specmodels/processor:processor')
COMPONENTS_PROCESSOR_LIB_TARGET = make_dep_path('litho-processor/src/main/java/com/facebook/litho/specmodels/processor:processor-lib')
# Sample app
COMPONENTS_SAMPLE_JAVA = make_dep_path('sample/src/main/java/com/facebook/samples/litho:litho')
COMPONENTS_SAMPLE_BAREBONES_JAVA = make_dep_path('sample-barebones/src/main/java/com/facebook/samples/lithobarebones:lithobarebones')
COMPONENTS_SAMPLE_RES = make_dep_path('sample:res')
# Other targets
COMPONENTS_OSS_TARGET = make_dep_path(":components")
# Targets that sometimes exist and sometimes don't
COMPONENTS_TEXTLAYOUTBUILDER_UTILS_TARGET = []
COMPONENTS_FRESCO_TARGETS = [
make_dep_path('lib/fbcore:fbcore'),
make_dep_path('lib/fresco:fresco-drawee'),
make_dep_path('lib/fresco:fresco'),
]
COMPONENTS_FRESCO_PIPELINE_TARGET = [make_dep_path('lib/fresco:imagepipeline')]
COMPONENTS_FRESCO_CONTROLLER_TARGET = []
COMPONENTS_FRESCO_INTERFACES_TARGET = []
def components_robolectric_test(
name,
*args,
**kwargs):
"""Tests that can successfully run from the library root folder."""
extra_vm_args = [
'-Drobolectric.dependency.dir=lib/android-all',
'-Dcom.facebook.litho.is_oss=true',
]
kwargs['vm_args'] = extra_vm_args
kwargs['use_cxx_libraries'] = True
kwargs['cxx_library_whitelist'] = [
'//lib/yogajni:jni',
'//lib/fbjni:jni',
]
robolectric_test(
name=name,
*args,
**kwargs)
# Within the OSS export, these are just aliases.
litho_android_library = android_library
components_robolectric_powermock_test = components_robolectric_test