Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor support lib dependencies in buck #21108

Closed
wants to merge 11 commits into from
3 changes: 1 addition & 2 deletions RNTester/android/app/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ rn_android_library(
srcs = glob(["src/main/java/**/*.java"]),
deps = [
":res",
react_native_dep("third-party/android/support/v4:lib-support-v4"),
react_native_dep("third-party/android/support/v7/appcompat-orig:appcompat"),
react_native_dep("third-party/android/support/appcompat-v7:appcompat-v7"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_target("java/com/facebook/react:react"),
react_native_target("java/com/facebook/react/modules/core:core"),
Expand Down
2 changes: 1 addition & 1 deletion ReactAndroid/src/androidTest/buck-runner/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ rn_android_binary(
deps = [
react_native_dep("android_res/com/facebook/catalyst/appcompat:appcompat"),
react_native_dep("libraries/soloader/java/com/facebook/soloader:soloader"),
react_native_dep("third-party/java/testing-support-lib:exposed-instrumentation-api"),
react_native_dep("third-party/android/support/test:exposed-instrumentation-api"),
react_native_integration_tests_target("assets:assets"),
react_native_integration_tests_target("java/com/facebook/react/tests:tests"),
react_native_target("java/com/facebook/react/devsupport:devsupport"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ rn_android_library(
],
deps = [
react_native_dep("libraries/soloader/java/com/facebook/soloader:soloader"),
react_native_dep("third-party/android/support/v4:lib-support-v4"),
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("third-party/java/buck-android-support:buck-android-support"),
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_dep("third-party/java/junit:junit"),
react_native_dep("third-party/java/mockito:mockito"),
react_native_dep("third-party/java/testing-support-lib:runner"),
react_native_dep("third-party/android/support/test:runner"),
react_native_integration_tests_target("java/com/facebook/react/testing/idledetection:idledetection"),
react_native_integration_tests_target("java/com/facebook/react/testing/network:network"),
react_native_target("java/com/facebook/react:react"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ rn_android_library(
"PUBLIC",
],
deps = [
react_native_dep("third-party/java/testing-support-lib:runner"),
react_native_dep("third-party/android/support/test:runner"),
react_native_target("java/com/facebook/react/bridge:bridge"),
react_native_target("java/com/facebook/react/modules/core:core"),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ rn_android_library(
"PUBLIC",
],
deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_target("java/com/facebook/react/bridge:bridge"),
react_native_target("java/com/facebook/react/module/annotations:annotations"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ rn_android_library(
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"),
react_native_dep("third-party/java/testing-support-lib:testing-support-lib"),
react_native_dep("third-party/android/support/v4:lib-support-v4"),
react_native_dep("third-party/android/support/v7/appcompat-orig:appcompat"),
react_native_dep("third-party/android/support/test:testing-support-lib"),
react_native_dep("third-party/android/support/appcompat-v7:appcompat-v7"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_integration_tests_target("java/com/facebook/react/testing:testing"),
react_native_integration_tests_target("java/com/facebook/react/testing/idledetection:idledetection"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ rn_android_library(
"PUBLIC",
],
deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_dep("third-party/java/junit:junit"),
react_native_integration_tests_target("java/com/facebook/react/testing:testing"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ rn_android_library(
react_native_dep("third-party/java/espresso:espresso"),
react_native_dep("third-party/java/fest:fest"),
react_native_dep("third-party/java/junit:junit"),
react_native_dep("third-party/java/testing-support-lib:testing-support-lib"),
react_native_dep("third-party/android/support/test:testing-support-lib"),
react_native_integration_tests_target("java/com/facebook/react/testing:testing"),
react_native_integration_tests_target("java/com/facebook/react/testing/rule:rule"),
react_native_target("java/com/facebook/react:react"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "rn_android_resou
rn_android_resource(
name = "appcompat",
package = "com.facebook.react",
res = react_native_dep("third-party/android/support/v7/appcompat-orig:res-unpacker-cmd"),
res = react_native_dep("third-party/android/support/appcompat-v7:res-unpacker-cmd"),
visibility = ["//ReactAndroid/..."],
)
5 changes: 1 addition & 4 deletions ReactAndroid/src/main/java/com/facebook/react/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,14 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
rn_android_library(
name = "react",
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",
],
deps = [
react_native_dep("java/com/facebook/systrace:systrace"),
react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"),
react_native_dep("libraries/soloader/java/com/facebook/soloader:soloader"),
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_target("java/com/facebook/debug/holder:holder"),
Expand Down
4 changes: 1 addition & 3 deletions ReactAndroid/src/main/java/com/facebook/react/animated/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@ rn_android_library(
srcs = glob([
"*.java",
]),
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
],
visibility = [
"PUBLIC",
],
deps = [
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"),
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
Expand Down
9 changes: 2 additions & 7 deletions ReactAndroid/src/main/java/com/facebook/react/bridge/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@ rn_android_library(
exclude = INTERFACES,
),
proguard_config = "reactnative.pro",
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
],
required_for_source_only_abi = True,
visibility = [
"PUBLIC",
],
deps = [
react_native_dep("third-party/android/support-annotations:android-support-annotations"),
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("java/com/facebook/debug/debugoverlay/model:model"),
react_native_dep("java/com/facebook/systrace:systrace"),
react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"),
Expand All @@ -54,14 +51,12 @@ rn_android_library(
name = "interfaces",
srcs = glob(INTERFACES),
proguard_config = "reactnative.pro",
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
],
required_for_source_only_abi = True,
visibility = [
"PUBLIC",
],
deps = [
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_target("java/com/facebook/debug/tags:tags"),
Expand Down
4 changes: 1 addition & 3 deletions ReactAndroid/src/main/java/com/facebook/react/common/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ rn_android_library(
["**/*.java"],
exclude = SUB_PROJECTS,
),
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
],
required_for_source_only_abi = True,
visibility = [
"PUBLIC",
],
deps = [
":build_config",
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"),
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
Expand Down
4 changes: 1 addition & 3 deletions ReactAndroid/src/main/java/com/facebook/react/fabric/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ rn_android_library(
"*.java",
"events/*.java",
]),
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
],
required_for_source_only_abi = True,
visibility = [
"PUBLIC",
Expand All @@ -17,6 +14,7 @@ rn_android_library(
YOGA_TARGET,
react_native_dep("java/com/facebook/systrace:systrace"),
react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"),
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_target("java/com/facebook/react:react"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
rn_android_library(
name = "jsc",
srcs = glob(["**/*.java"]),
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
],
required_for_source_only_abi = True,
visibility = [
"PUBLIC",
],
deps = [
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("libraries/soloader/java/com/facebook/soloader:soloader"),
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
react_native_target("java/com/facebook/react/bridge:bridge"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
rn_android_library(
name = "blob",
srcs = glob(["**/*.java"]),
provided_deps = [
react_native_dep("third-party/android/support-annotations:android-support-annotations"),
react_native_dep("third-party/android/support/v4:lib-support-v4"),
],
visibility = [
"PUBLIC",
],
deps = [
react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"),
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_dep("third-party/java/okhttp:okhttp3"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
rn_android_library(
name = "datepicker",
srcs = glob(["**/*.java"]),
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
],
visibility = [
"PUBLIC",
],
deps = [
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_target("java/com/facebook/react/bridge:bridge"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
rn_android_library(
name = "dialog",
srcs = glob(["**/*.java"]),
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
],
visibility = [
"PUBLIC",
],
deps = [
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"),
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
rn_android_library(
name = "fresco",
srcs = glob(["**/*.java"]),
provided_deps = [
react_native_dep("third-party/android/support-annotations:android-support-annotations"),
react_native_dep("third-party/android/support/v4:lib-support-v4"),
],
visibility = [
"PUBLIC",
],
Expand All @@ -19,6 +15,7 @@ rn_android_library(
react_native_dep("libraries/fresco/fresco-react-native:imagepipeline"),
react_native_dep("libraries/fresco/fresco-react-native:imagepipeline-okhttp3"),
react_native_dep("libraries/soloader/java/com/facebook/soloader:soloader"),
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_dep("third-party/java/okhttp:okhttp3"),
react_native_dep("third-party/java/okhttp:okhttp3-urlconnection"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
rn_android_library(
name = "i18nmanager",
srcs = glob(["*.java"]),
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
],
visibility = [
"PUBLIC",
],
deps = [
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_target("java/com/facebook/react/bridge:bridge"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
rn_android_library(
name = "netinfo",
srcs = glob(["**/*.java"]),
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
],
visibility = [
"PUBLIC",
],
deps = [
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"),
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
rn_android_library(
name = "network",
srcs = glob(["**/*.java"]),
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
],
visibility = [
"PUBLIC",
],
deps = [
react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"),
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_dep("third-party/java/okhttp:okhttp3"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
rn_android_library(
name = "statusbar",
srcs = glob(["**/*.java"]),
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
],
visibility = [
"PUBLIC",
],
deps = [
react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"),
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_target("java/com/facebook/react/bridge:bridge"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
rn_android_library(
name = "timepicker",
srcs = glob(["**/*.java"]),
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
],
visibility = [
"PUBLIC",
],
deps = [
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_target("java/com/facebook/react/bridge:bridge"),
Expand Down
4 changes: 1 addition & 3 deletions ReactAndroid/src/main/java/com/facebook/react/shell/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@ load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "react_native_tar
rn_android_library(
name = "shell",
srcs = glob(["**/*.java"]),
provided_deps = [
react_native_dep("third-party/android/support/v4:lib-support-v4"),
],
visibility = [
"PUBLIC",
],
deps = [
react_native_dep("libraries/fresco/fresco-react-native:imagepipeline"),
react_native_dep("libraries/soloader/java/com/facebook/soloader:soloader"),
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
react_native_dep("third-party/java/jsr-305:jsr-305"),
react_native_target("java/com/facebook/react:react"),
Expand Down
5 changes: 1 addition & 4 deletions ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ rn_android_library(
],
exclude = ["DisplayMetricsHolder.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"),
],
required_for_source_only_abi = True,
visibility = [
"PUBLIC",
Expand All @@ -24,6 +20,7 @@ rn_android_library(
":DisplayMetrics",
react_native_dep("java/com/facebook/systrace:systrace"),
react_native_dep("libraries/fbcore/src/main/java/com/facebook/common/logging:logging"),
react_native_dep("third-party/android/support/v4:support-v4"),
react_native_dep("third-party/java/infer-annotations:infer-annotations"),
react_native_target("java/com/facebook/debug/tags:tags"),
react_native_target("java/com/facebook/debug/holder:holder"),
Expand Down
Loading