diff --git a/BUCK b/BUCK index f56201cf..9a3408aa 100644 --- a/BUCK +++ b/BUCK @@ -11,10 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +load("//:SCREENSHOT_TESTS_DEFS", "SCREENSHOT_TESTS_CORE_TARGET", "SCREENSHOT_TESTS_LAYOUT_HIERARCHY_COMMON_TARGET", "SCREENSHOT_TESTS_LAYOUT_HIERARCHY_LITHO_TARGET", "SCREENSHOT_TESTS_VISIBILITY", "fb_core_android_library") -load("//:SCREENSHOT_TESTS_DEFS", "SCREENSHOT_TESTS_CORE_TARGET", "SCREENSHOT_TESTS_LAYOUT_HIERARCHY_COMMON_TARGET", "SCREENSHOT_TESTS_LAYOUT_HIERARCHY_LITHO_TARGET", "SCREENSHOT_TESTS_VISIBILITY") - -android_library( +fb_core_android_library( name = "screenshot", exported_deps = [ SCREENSHOT_TESTS_CORE_TARGET, diff --git a/SCREENSHOT_TESTS_DEFS b/SCREENSHOT_TESTS_DEFS index 9d58e385..d24612fa 100644 --- a/SCREENSHOT_TESTS_DEFS +++ b/SCREENSHOT_TESTS_DEFS @@ -15,3 +15,7 @@ SCREENSHOT_TESTS_LITHO_WIDGET_TARGET = dep('lib/litho:litho-widget') SCREENSHOT_TESTS_JUNIT_TARGET = dep('lib/junit:junit') SCREENSHOT_TESTS_DEXMAKER_TARGET = dep('lib/dexmaker:dexmaker') SCREENSHOT_TESTS_DEXMAKER_DX_TARGET = dep('lib/dexmaker:dexmaker-dx') + + +def fb_core_android_library(**kwargs): + native.android_library(**kwargs) diff --git a/core/src/main/java/com/facebook/testing/screenshot/BUCK b/core/src/main/java/com/facebook/testing/screenshot/BUCK index a49c3dec..1dcbe42c 100644 --- a/core/src/main/java/com/facebook/testing/screenshot/BUCK +++ b/core/src/main/java/com/facebook/testing/screenshot/BUCK @@ -11,10 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +load("//:SCREENSHOT_TESTS_DEFS", "SCREENSHOT_TESTS_VISIBILITY", "fb_core_android_library") -load("//:SCREENSHOT_TESTS_DEFS", "SCREENSHOT_TESTS_VISIBILITY") - -android_library( +fb_core_android_library( name = "screenshot", srcs = glob(["**/*.java"]), visibility = SCREENSHOT_TESTS_VISIBILITY, diff --git a/layout-hierarchy-common/src/main/java/com/facebook/testing/screenshot/layouthierarchy/common/BUCK b/layout-hierarchy-common/src/main/java/com/facebook/testing/screenshot/layouthierarchy/common/BUCK index 63f92500..3dcefe48 100644 --- a/layout-hierarchy-common/src/main/java/com/facebook/testing/screenshot/layouthierarchy/common/BUCK +++ b/layout-hierarchy-common/src/main/java/com/facebook/testing/screenshot/layouthierarchy/common/BUCK @@ -11,10 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +load("//:SCREENSHOT_TESTS_DEFS", "SCREENSHOT_TESTS_CORE_TARGET", "SCREENSHOT_TESTS_VISIBILITY", "fb_core_android_library") -load("//:SCREENSHOT_TESTS_DEFS", "SCREENSHOT_TESTS_CORE_TARGET", "SCREENSHOT_TESTS_VISIBILITY") - -android_library( +fb_core_android_library( name = "common", srcs = glob(["**/*.java"]), visibility = SCREENSHOT_TESTS_VISIBILITY, diff --git a/layout-hierarchy-litho/src/main/java/com/facebook/testing/screenshot/layouthierarchy/litho/BUCK b/layout-hierarchy-litho/src/main/java/com/facebook/testing/screenshot/layouthierarchy/litho/BUCK index 92356481..071acdd1 100644 --- a/layout-hierarchy-litho/src/main/java/com/facebook/testing/screenshot/layouthierarchy/litho/BUCK +++ b/layout-hierarchy-litho/src/main/java/com/facebook/testing/screenshot/layouthierarchy/litho/BUCK @@ -11,10 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +load("//:SCREENSHOT_TESTS_DEFS", "SCREENSHOT_TESTS_CORE_TARGET", "SCREENSHOT_TESTS_LITHO_CORE_TARGET", "SCREENSHOT_TESTS_LITHO_WIDGET_TARGET", "SCREENSHOT_TESTS_VISIBILITY", "fb_core_android_library") -load("//:SCREENSHOT_TESTS_DEFS", "SCREENSHOT_TESTS_CORE_TARGET", "SCREENSHOT_TESTS_LITHO_CORE_TARGET", "SCREENSHOT_TESTS_LITHO_WIDGET_TARGET", "SCREENSHOT_TESTS_VISIBILITY") - -android_library( +fb_core_android_library( name = "litho", srcs = glob(["**/*.java"]), visibility = SCREENSHOT_TESTS_VISIBILITY, diff --git a/lib/litho/BUCK b/lib/litho/BUCK index 979aa7e7..5e4052a3 100644 --- a/lib/litho/BUCK +++ b/lib/litho/BUCK @@ -11,8 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +load("//:SCREENSHOT_TESTS_DEFS", "fb_core_android_library") -android_library( +fb_core_android_library( name = "litho-core", exported_deps = [ ":litho-core-prebuilt", @@ -32,7 +33,7 @@ remote_file( url = "mvn:com.facebook.litho:litho-core:aar:0.7.0", ) -android_library( +fb_core_android_library( name = "litho-widget", exported_deps = [ ":litho-widget-prebuilt",