Skip to content

Commit

Permalink
Use fb_native_wrapper for all targets
Browse files Browse the repository at this point in the history
Differential Revision: D12867696

fbshipit-source-id: bd52c1ead04065addece3a3104c4a1a9359ceb95
  • Loading branch information
scottrice authored and facebook-github-bot committed Oct 31, 2018
1 parent e90319e commit c147073
Show file tree
Hide file tree
Showing 25 changed files with 144 additions and 106 deletions.
10 changes: 6 additions & 4 deletions ReactAndroid/libs/BUCK
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
android_prebuilt_aar(
load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native")

fb_native.android_prebuilt_aar(
name = "appcompat",
aar = ":appcompat-binary-aar",
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "appcompat-binary-aar",
sha1 = "22b1ef4ff9ef1a3513c18eb132d597eac6ef1a86",
url = "mvn:com.android.support:appcompat-v7:aar:27.1.1",
)

android_prebuilt_aar(
fb_native.android_prebuilt_aar(
name = "android-jsc",
aar = ":android-jsc-aar",
)

remote_file(
fb_native.remote_file(
name = "android-jsc-aar",
sha1 = "880cedd93f43e0fc841f01f2fa185a63d9230f85",
url = "mvn:org.webkit:android-jsc:aar:r174650",
Expand Down
3 changes: 2 additions & 1 deletion ReactAndroid/src/main/jni/prebuilt/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
load("//tools/build_defs/oss:rn_defs.bzl", "rn_android_prebuilt_aar", "rn_prebuilt_native_library")
# Temp workaround to get the build working e2e, Gradle builds them for us

Expand All @@ -13,7 +14,7 @@ rn_android_prebuilt_aar(
visibility = ["PUBLIC"],
)

remote_file(
fb_native.remote_file(
name = "android-jsc-aar",
sha1 = "880cedd93f43e0fc841f01f2fa185a63d9230f85",
url = "mvn:org.webkit:android-jsc:aar:r174650",
Expand Down
10 changes: 6 additions & 4 deletions ReactAndroid/src/main/jni/third-party/glibc/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

# libpthread is implicitly included in the android runtime so, when building
# on an android platform, we don't do anything.
prebuilt_cxx_library(
load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native")

fb_native.prebuilt_cxx_library(
name = "pthread",
exported_platform_linker_flags = [
(
Expand All @@ -26,7 +28,7 @@ prebuilt_cxx_library(
],
)

prebuilt_cxx_library(
fb_native.prebuilt_cxx_library(
name = "dl",
exported_linker_flags = [
"-ldl",
Expand All @@ -37,7 +39,7 @@ prebuilt_cxx_library(
],
)

prebuilt_cxx_library(
fb_native.prebuilt_cxx_library(
name = "m",
exported_linker_flags = [
"-lm",
Expand All @@ -48,7 +50,7 @@ prebuilt_cxx_library(
],
)

prebuilt_cxx_library(
fb_native.prebuilt_cxx_library(
name = "rt",
exported_platform_linker_flags = [
(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
load("//tools/build_defs/oss:rn_defs.bzl", "rn_android_library", "rn_prebuilt_jar")

rn_android_library(
Expand Down Expand Up @@ -25,7 +26,7 @@ rn_prebuilt_jar(
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "download-powermock-core.jar",
sha1 = "ea04e79244e19dcf0c3ccf6863c5b028b4b58c9c",
url = "mvn:org.powermock:powermock-core:jar:1.6.2",
Expand All @@ -37,7 +38,7 @@ rn_prebuilt_jar(
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "download-powermock-api-mockito.jar",
sha1 = "c213230ae20a7b422f3d622a261d0e3427d2464c",
url = "mvn:org.powermock:powermock-api-mockito:jar:1.6.2",
Expand All @@ -49,7 +50,7 @@ rn_prebuilt_jar(
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "download-powermock-api-support.jar",
sha1 = "93b21413b4ee99b7bc0dd34e1416fdca96866aaf",
url = "mvn:org.powermock:powermock-api-support:jar:1.6.2",
Expand All @@ -61,7 +62,7 @@ rn_prebuilt_jar(
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "download-powermock-module-junit4-rule.jar",
sha1 = "4847638c5729b9f203e21144b0bdb5d34d888473",
url = "mvn:org.powermock:powermock-module-junit4-rule:jar:1.6.2",
Expand All @@ -73,7 +74,7 @@ rn_prebuilt_jar(
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "download-powermock-classloading-xstream.jar",
sha1 = "3ced31cd7024fe365b9f3c8082d22c02434577da",
url = "mvn:org.powermock:powermock-classloading-xstream:jar:1.6.2",
Expand All @@ -85,7 +86,7 @@ rn_prebuilt_jar(
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "download-powermock-classloading-base.jar",
sha1 = "c8bfc10731a02d3b241892cf2c334a754d473ca7",
url = "mvn:org.powermock:powermock-classloading-base:jar:1.6.2",
Expand All @@ -97,7 +98,7 @@ rn_prebuilt_jar(
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "download-xstream.jar",
sha1 = "97e5013f391487cce4de6b0eebcde21549e91872",
url = "mvn:com.thoughtworks.xstream:xstream:jar:1.4.2",
Expand All @@ -109,7 +110,7 @@ rn_prebuilt_jar(
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "download-powermock-reflect.jar",
sha1 = "1af1bbd1207c3ecdcf64973e6f9d57dcd17cc145",
url = "mvn:org.powermock:powermock-reflect:jar:1.6.2",
Expand All @@ -121,7 +122,7 @@ rn_prebuilt_jar(
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "download-javassist.jar",
sha1 = "a9cbcdfb7e9f86fbc74d3afae65f2248bfbf82a0",
url = "mvn:org.javassist:javassist:jar:3.20.0-GA",
Expand All @@ -133,7 +134,7 @@ rn_prebuilt_jar(
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "download-mockito-all.jar",
sha1 = "539df70269cc254a58cccc5d8e43286b4a73bf30",
url = "mvn:org.mockito:mockito-all:jar:1.10.19",
Expand All @@ -145,7 +146,7 @@ rn_prebuilt_jar(
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "download-xmlpull.jar",
sha1 = "2b8e230d2ab644e4ecaa94db7cdedbc40c805dfa",
url = "mvn:xmlpull:xmlpull:jar:1.1.3.1",
Expand All @@ -157,7 +158,7 @@ rn_prebuilt_jar(
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "download-xpp3.jar",
sha1 = "19d4e90b43059058f6e056f794f0ea4030d60b86",
url = "mvn:xpp3:xpp3_min:jar:1.1.4c",
Expand Down
21 changes: 11 additions & 10 deletions ReactAndroid/src/main/libraries/fresco/fresco-react-native/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
load("//tools/build_defs/oss:rn_defs.bzl", "rn_android_library", "rn_android_prebuilt_aar", "rn_prebuilt_jar")

rn_android_prebuilt_aar(
Expand All @@ -6,19 +7,19 @@ rn_android_prebuilt_aar(
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "fresco-binary-aar",
sha1 = "076812472879be341f392c4aab469b8fdf8c6759",
url = "mvn:com.facebook.fresco:fresco:aar:1.10.0",
)

android_prebuilt_aar(
fb_native.android_prebuilt_aar(
name = "fresco-drawee",
aar = ":drawee-binary-aar",
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "drawee-binary-aar",
sha1 = "c1fef7cdc5f6e4fd7d7c58522075c6b66f46a52b",
url = "mvn:com.facebook.fresco:drawee:aar:1.10.0",
Expand All @@ -40,7 +41,7 @@ rn_android_prebuilt_aar(
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "imagepipeline-base-aar",
sha1 = "56672fa5fa46bf4962adecc7c88a1544f5a20225",
url = "mvn:com.facebook.fresco:imagepipeline-base:aar:1.10.0",
Expand All @@ -52,7 +53,7 @@ rn_android_prebuilt_aar(
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "imagepipeline-aar",
sha1 = "e317bdb7f18f0f4ac4f3ab5d3edb49fd09290a6f",
url = "mvn:com.facebook.fresco:imagepipeline:aar:1.10.0",
Expand All @@ -64,31 +65,31 @@ rn_prebuilt_jar(
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "download-bolts.jar",
sha1 = "d85884acf6810a3bbbecb587f239005cbc846dc4",
url = "mvn:com.parse.bolts:bolts-tasks:jar:1.4.0",
)

android_prebuilt_aar(
fb_native.android_prebuilt_aar(
name = "fbcore",
aar = ":fbcore-aar",
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "fbcore-aar",
sha1 = "d79dbf5e47d6e528dd1f90170e0299c14d835ab8",
url = "mvn:com.facebook.fresco:fbcore:aar:1.10.0",
)

android_prebuilt_aar(
fb_native.android_prebuilt_aar(
name = "imagepipeline-okhttp3",
aar = ":imagepipeline-okhttp3-binary-aar",
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "imagepipeline-okhttp3-binary-aar",
sha1 = "3429ffb776d7511d0f911fbe9efda4c73179d416",
url = "mvn:com.facebook.fresco:imagepipeline-okhttp3:aar:1.10.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
android_prebuilt_aar(
load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native")

fb_native.android_prebuilt_aar(
name = "soloader",
aar = ":soloader-binary-aar",
visibility = ["PUBLIC"],
)

remote_file(
fb_native.remote_file(
name = "soloader-binary-aar",
sha1 = "042357559a6c9313bdb9b1ba137a9df3b5365f35",
url = "mvn:com.facebook.soloader:soloader:aar:0.5.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
prebuilt_jar(
load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native")

fb_native.prebuilt_jar(
name = "android-support-annotations",
binary_jar = ":support-annotations-binary.jar",
visibility = ["//ReactAndroid/..."],
)

remote_file(
fb_native.remote_file(
name = "support-annotations-binary.jar",
sha1 = "39ded76b5e1ce1c5b2688e1d25cdc20ecee32007",
url = "mvn:com.android.support:support-annotations:jar:27.1.1",
Expand Down
3 changes: 2 additions & 1 deletion ReactAndroid/src/main/third-party/android/support/BUCK
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
load("//tools/build_defs/oss:rn_defs.bzl", "react_native_dep", "rn_android_library", "rn_android_resource", "rn_prebuilt_jar")

rn_android_library(
Expand All @@ -17,7 +18,7 @@ rn_android_library(
)

# a fake genrule so that BUCK files in react native are preseable in fbsource
genrule(
fb_native.genrule(
name = "appcompat-res-cmd",
out = ".",
bash = "ls",
Expand Down
Loading

0 comments on commit c147073

Please sign in to comment.