Skip to content

Commit

Permalink
Fix failing Android CI (#21083)
Browse files Browse the repository at this point in the history
Summary:
This PR does 2 things:

 * Have Facebook internal dependencies only be added if `IS_OSS_BUILD` is `True`. This syntax is used in other BUCK files in the codebase.
    * `ReactAndroid/src/androidTest/java/com/facebook/react/tests/core/BUCK`
    * `ReactAndroid/src/androidTest/java/com/facebook/react/testing/rule/BUCK`
* Add a missing Android dependency to this BUCK file:
    * `ReactAndroid/src/main/java/com/facebook/react/BUCK`

As a result, `test_android` is passing again.
Pull Request resolved: #21083

Differential Revision: D9809808

Pulled By: hramos

fbshipit-source-id: c840ea2892006a88fe13de1b1324746d030ebaf2
  • Loading branch information
empyrical authored and facebook-github-bot committed Sep 13, 2018
1 parent 4b106be commit cb87c3f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# BUILD FILE SYNTAX: SKYLARK
load(
"//tools/build_defs/oss:rn_defs.bzl",
"IS_OSS_BUILD",
"react_native_dep",
"react_native_integration_tests_target",
"react_native_target",
Expand All @@ -13,9 +14,7 @@ rn_android_library(
visibility = [
"PUBLIC",
],
deps = [
react_native_dep("java/com/facebook/testing/instrumentation:instrumentation"),
react_native_dep("java/com/facebook/testing/instrumentation/base:base"),
deps = ([
react_native_dep("third-party/java/espresso:espresso"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_dep("third-party/java/junit:junit"),
Expand All @@ -31,5 +30,8 @@ rn_android_library(
react_native_target("java/com/facebook/react/modules/core:core"),
react_native_target("java/com/facebook/react/shell:shell"),
react_native_target("java/com/facebook/react/uimanager:uimanager"),
],
]) + ([
react_native_dep("java/com/facebook/testing/instrumentation:instrumentation"),
react_native_dep("java/com/facebook/testing/instrumentation/base:base"),
]) if not IS_OSS_BUILD else [],
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# BUILD FILE SYNTAX: SKYLARK
load(
"//tools/build_defs/oss:rn_defs.bzl",
"IS_OSS_BUILD",
"react_native_dep",
"react_native_integration_tests_target",
"react_native_target",
Expand All @@ -10,8 +11,7 @@ load(
rn_android_library(
name = "core",
srcs = glob(["*.java"]),
deps = [
react_native_dep("java/com/facebook/fbreact/testing:testing"),
deps = ([
react_native_dep("third-party/java/espresso:espresso"),
react_native_dep("third-party/java/fest:fest"),
react_native_dep("third-party/java/junit:junit"),
Expand All @@ -22,5 +22,7 @@ rn_android_library(
react_native_target("java/com/facebook/react/bridge:bridge"),
react_native_target("java/com/facebook/react/shell:shell"),
react_native_target("java/com/facebook/react/uimanager:uimanager"),
],
]) + ([
react_native_dep("java/com/facebook/fbreact/testing:testing"),
]) if not IS_OSS_BUILD else [],
)
1 change: 1 addition & 0 deletions ReactAndroid/src/main/java/com/facebook/react/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ rn_android_library(
srcs = glob(["*.java"]),
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
react_native_dep("third-party/android/support-annotations:android-support-annotations"),
],
visibility = [
"PUBLIC",
Expand Down

0 comments on commit cb87c3f

Please sign in to comment.