From 581434ac04c6bd465f373e6fcc6aa0d1de7dea0b Mon Sep 17 00:00:00 2001 From: Martin Konicek Date: Fri, 22 Jan 2016 16:03:51 +0000 Subject: [PATCH] Add BUCK files --- ReactAndroid/DEFS | 53 +++++++++++++ ReactAndroid/libs/BUCK | 22 ++++++ .../java/com/facebook/react/testing/BUCK | 30 ++++++++ .../java/com/facebook/react/tests/BUCK | 18 +++++ .../src/main/java/com/facebook/csslayout/BUCK | 15 ++++ .../src/main/java/com/facebook/jni/BUCK | 17 +++++ .../src/main/java/com/facebook/perftest/BUCK | 11 +++ .../com/facebook/proguard/annotations/BUCK | 14 ++++ .../src/main/java/com/facebook/quicklog/BUCK | 16 ++++ .../com/facebook/quicklog/identifiers/BUCK | 11 +++ .../src/main/java/com/facebook/react/BUCK | 28 +++++++ .../java/com/facebook/react/animation/BUCK | 18 +++++ .../main/java/com/facebook/react/bridge/BUCK | 42 +++++++++++ .../main/java/com/facebook/react/common/BUCK | 32 ++++++++ .../java/com/facebook/react/devsupport/BUCK | 26 +++++++ .../com/facebook/react/modules/appstate/BUCK | 21 ++++++ .../com/facebook/react/modules/camera/BUCK | 20 +++++ .../com/facebook/react/modules/clipboard/BUCK | 20 +++++ .../com/facebook/react/modules/common/BUCK | 20 +++++ .../java/com/facebook/react/modules/core/BUCK | 22 ++++++ .../com/facebook/react/modules/debug/BUCK | 21 ++++++ .../com/facebook/react/modules/dialog/BUCK | 20 +++++ .../com/facebook/react/modules/fresco/BUCK | 29 ++++++++ .../com/facebook/react/modules/intent/BUCK | 19 +++++ .../com/facebook/react/modules/location/BUCK | 20 +++++ .../com/facebook/react/modules/netinfo/BUCK | 22 ++++++ .../com/facebook/react/modules/network/BUCK | 26 +++++++ .../com/facebook/react/modules/storage/BUCK | 21 ++++++ .../facebook/react/modules/systeminfo/BUCK | 19 +++++ .../com/facebook/react/modules/toast/BUCK | 19 +++++ .../com/facebook/react/modules/websocket/BUCK | 24 ++++++ .../java/com/facebook/react/processing/BUCK | 22 ++++++ .../main/java/com/facebook/react/shell/BUCK | 54 ++++++++++++++ .../main/java/com/facebook/react/touch/BUCK | 17 +++++ .../java/com/facebook/react/uimanager/BUCK | 31 ++++++++ .../facebook/react/uimanager/annotations/BUCK | 16 ++++ .../java/com/facebook/react/views/art/BUCK | 22 ++++++ .../java/com/facebook/react/views/drawer/BUCK | 23 ++++++ .../java/com/facebook/react/views/image/BUCK | 26 +++++++ .../java/com/facebook/react/views/picker/BUCK | 21 ++++++ .../com/facebook/react/views/progressbar/BUCK | 22 ++++++ .../facebook/react/views/recyclerview/BUCK | 26 +++++++ .../java/com/facebook/react/views/scroll/BUCK | 24 ++++++ .../facebook/react/views/swiperefresh/BUCK | 22 ++++++ .../com/facebook/react/views/switchview/BUCK | 22 ++++++ .../java/com/facebook/react/views/text/BUCK | 26 +++++++ .../com/facebook/react/views/textinput/BUCK | 24 ++++++ .../com/facebook/react/views/toolbar/BUCK | 27 +++++++ .../java/com/facebook/react/views/view/BUCK | 23 ++++++ .../com/facebook/react/views/viewpager/BUCK | 23 ++++++ .../com/facebook/react/views/webview/BUCK | 20 +++++ .../src/main/java/com/facebook/systrace/BUCK | 11 +++ ReactAndroid/src/main/jni/first-party/fb/BUCK | 28 +++++++ .../src/main/jni/first-party/jni/BUCK | 50 +++++++++++++ ReactAndroid/src/main/jni/react/BUCK | 74 +++++++++++++++++++ ReactAndroid/src/main/jni/react/jni/BUCK | 64 ++++++++++++++++ .../src/main/jni/react/perftests/BUCK | 21 ++++++ .../src/main/jni/third-party/android-ndk/BUCK | 24 ++++++ .../src/main/jni/third-party/glibc/BUCK | 52 +++++++++++++ .../java/com/facebook/common/logging/BUCK | 11 +++ .../src/test/java/com/facebook/powermock/BUCK | 73 ++++++++++++++++++ .../libraries/fresco/fresco-react-native/BUCK | 59 +++++++++++++++ .../soloader/java/com/facebook/soloader/BUCK | 20 +++++ ReactAndroid/src/main/res/BUCK | 19 +++++ .../v7/appcompat/BUCK | 36 +++++++++ .../android/support-annotations/BUCK | 11 +++ .../main/third-party/android/support/v4/BUCK | 23 ++++++ .../android/support/v7/recyclerview/BUCK | 13 ++++ .../src/main/third-party/java/fest/BUCK | 11 +++ .../third-party/java/infer-annotations/BUCK | 5 ++ .../src/main/third-party/java/jackson/BUCK | 11 +++ .../src/main/third-party/java/javapoet/BUCK | 11 +++ .../src/main/third-party/java/jsr-305/BUCK | 11 +++ .../src/main/third-party/java/junit/BUCK | 11 +++ .../src/main/third-party/java/mockito/BUCK | 11 +++ .../src/main/third-party/java/okhttp/BUCK | 23 ++++++ .../src/main/third-party/java/okio/BUCK | 11 +++ .../java/robolectric3/robolectric/BUCK | 45 +++++++++++ .../src/main/third-party/java/stetho/BUCK | 23 ++++++ .../test/java/com/facebook/react/bridge/BUCK | 19 +++++ .../test/java/com/facebook/react/modules/BUCK | 41 ++++++++++ .../test/java/org/mockito/configuration/BUCK | 16 ++++ 82 files changed, 2025 insertions(+) create mode 100644 ReactAndroid/DEFS create mode 100644 ReactAndroid/libs/BUCK create mode 100644 ReactAndroid/src/androidTest/java/com/facebook/react/testing/BUCK create mode 100644 ReactAndroid/src/androidTest/java/com/facebook/react/tests/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/csslayout/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/jni/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/perftest/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/proguard/annotations/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/quicklog/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/quicklog/identifiers/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/animation/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/bridge/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/common/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/devsupport/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/modules/appstate/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/modules/camera/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/modules/clipboard/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/modules/common/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/modules/core/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/modules/debug/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/modules/dialog/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/modules/fresco/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/modules/intent/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/modules/location/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/modules/netinfo/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/modules/network/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/modules/storage/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/modules/toast/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/modules/websocket/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/processing/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/shell/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/touch/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/uimanager/annotations/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/views/art/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/views/drawer/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/views/image/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/views/picker/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/views/progressbar/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/views/recyclerview/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/views/scroll/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/views/switchview/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/views/text/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/views/textinput/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/views/toolbar/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/views/view/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/views/viewpager/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/react/views/webview/BUCK create mode 100644 ReactAndroid/src/main/java/com/facebook/systrace/BUCK create mode 100644 ReactAndroid/src/main/jni/first-party/fb/BUCK create mode 100644 ReactAndroid/src/main/jni/first-party/jni/BUCK create mode 100644 ReactAndroid/src/main/jni/react/BUCK create mode 100644 ReactAndroid/src/main/jni/react/jni/BUCK create mode 100644 ReactAndroid/src/main/jni/react/perftests/BUCK create mode 100644 ReactAndroid/src/main/jni/third-party/android-ndk/BUCK create mode 100644 ReactAndroid/src/main/jni/third-party/glibc/BUCK create mode 100644 ReactAndroid/src/main/libraries/fbcore/src/main/java/com/facebook/common/logging/BUCK create mode 100644 ReactAndroid/src/main/libraries/fbcore/src/test/java/com/facebook/powermock/BUCK create mode 100644 ReactAndroid/src/main/libraries/fresco/fresco-react-native/BUCK create mode 100644 ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/BUCK create mode 100644 ReactAndroid/src/main/res/BUCK create mode 100644 ReactAndroid/src/main/third-party/android-support-for-standalone-apps/v7/appcompat/BUCK create mode 100644 ReactAndroid/src/main/third-party/android/support-annotations/BUCK create mode 100644 ReactAndroid/src/main/third-party/android/support/v4/BUCK create mode 100644 ReactAndroid/src/main/third-party/android/support/v7/recyclerview/BUCK create mode 100644 ReactAndroid/src/main/third-party/java/fest/BUCK create mode 100644 ReactAndroid/src/main/third-party/java/infer-annotations/BUCK create mode 100644 ReactAndroid/src/main/third-party/java/jackson/BUCK create mode 100644 ReactAndroid/src/main/third-party/java/javapoet/BUCK create mode 100644 ReactAndroid/src/main/third-party/java/jsr-305/BUCK create mode 100644 ReactAndroid/src/main/third-party/java/junit/BUCK create mode 100644 ReactAndroid/src/main/third-party/java/mockito/BUCK create mode 100644 ReactAndroid/src/main/third-party/java/okhttp/BUCK create mode 100644 ReactAndroid/src/main/third-party/java/okio/BUCK create mode 100644 ReactAndroid/src/main/third-party/java/robolectric3/robolectric/BUCK create mode 100644 ReactAndroid/src/main/third-party/java/stetho/BUCK create mode 100644 ReactAndroid/src/test/java/com/facebook/react/bridge/BUCK create mode 100644 ReactAndroid/src/test/java/com/facebook/react/modules/BUCK create mode 100644 ReactAndroid/src/test/java/org/mockito/configuration/BUCK diff --git a/ReactAndroid/DEFS b/ReactAndroid/DEFS new file mode 100644 index 000000000..87477552f --- /dev/null +++ b/ReactAndroid/DEFS @@ -0,0 +1,53 @@ +# Helpers for referring to React Native open source code. +# +# This lets us build React Native: +# - At Facebook by running buck from the root of the fb repo +# - Outside of Facebook by running buck in the root of the git repo + +# Example: react_native_target('java/com/facebook/react/common:common') +def react_native_target(path): + return '//ReactAndroid/src/main/' + path + +# Example: react_native_tests_target('java/com/facebook/react/modules:modules') +def react_native_tests_target(path): + return '//ReactAndroid/src/test/' + path + +# Example: react_native_integration_tests_target('java/com/facebook/react/testing:testing') +def react_native_integration_tests_target(path): + return '//ReactAndroid/src/androidTest/' + path + +# Helper for referring to non-RN code from RN OSS code. +# Example: react_native_dep('java/com/facebook/systrace:systrace') +def react_native_dep(path): + return '//ReactAndroid/src/main/' + path + +INTERNAL_APP = 'PUBLIC' + +# React property preprocessor +original_android_library=android_library +def android_library( + name, + deps=[], + annotation_processors=[], + annotation_processor_deps=[], + *args, + **kwargs): + + common_processors = [ + 'com.facebook.react.processing.ReactPropertyProcessor', + ] + common_processor_deps = [ + react_native_target('java/com/facebook/react/processing:processing'), + ] + + if react_native_target('java/com/facebook/react/uimanager/annotations:annotations') in deps and name != 'processing': + annotation_processors = list(set(annotation_processors + common_processors)) + annotation_processor_deps = list(set(annotation_processor_deps + common_processor_deps)) + + original_android_library( + name=name, + deps=deps, + annotation_processors=annotation_processors, + annotation_processor_deps=annotation_processor_deps, + *args, + **kwargs) diff --git a/ReactAndroid/libs/BUCK b/ReactAndroid/libs/BUCK new file mode 100644 index 000000000..8699bb339 --- /dev/null +++ b/ReactAndroid/libs/BUCK @@ -0,0 +1,22 @@ +android_prebuilt_aar( + name = 'appcompat', + aar = ':appcompat-binary-aar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'appcompat-binary-aar', + url = 'mvn:com.android.support:appcompat-v7:aar:23.0.1', + sha1 = '7d659f671541394a8bc2b9f909950aa2a5ec87ff', +) + +android_prebuilt_aar( + name = 'android-jsc', + aar = ':android-jsc-aar', +) + +remote_file( + name = 'android-jsc-aar', + url = 'mvn:org.webkit:android-jsc:aar:r174650', + sha1 = '880cedd93f43e0fc841f01f2fa185a63d9230f85', +) diff --git a/ReactAndroid/src/androidTest/java/com/facebook/react/testing/BUCK b/ReactAndroid/src/androidTest/java/com/facebook/react/testing/BUCK new file mode 100644 index 000000000..d3c6d7255 --- /dev/null +++ b/ReactAndroid/src/androidTest/java/com/facebook/react/testing/BUCK @@ -0,0 +1,30 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'testing', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react:react'), + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/react/modules/core:core'), + react_native_target('java/com/facebook/react/modules/debug:debug'), + react_native_target('java/com/facebook/react/devsupport:devsupport'), + react_native_target('java/com/facebook/react/shell:shell'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + 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/java/guava:guava'), + 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/testing-support-lib:testing-support-lib'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':testing', +) diff --git a/ReactAndroid/src/androidTest/java/com/facebook/react/tests/BUCK b/ReactAndroid/src/androidTest/java/com/facebook/react/tests/BUCK new file mode 100644 index 000000000..78d23f135 --- /dev/null +++ b/ReactAndroid/src/androidTest/java/com/facebook/react/tests/BUCK @@ -0,0 +1,18 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'tests', + srcs = glob(['**/*.java']), + deps = [ + react_native_integration_tests_target('java/com/facebook/react/testing:testing'), + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':tests', +) diff --git a/ReactAndroid/src/main/java/com/facebook/csslayout/BUCK b/ReactAndroid/src/main/java/com/facebook/csslayout/BUCK new file mode 100644 index 000000000..da7888de9 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/csslayout/BUCK @@ -0,0 +1,15 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'csslayout', + srcs = glob(['**/*.java']), + deps = [ + react_native_dep('third-party/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = ['PUBLIC'], +) + +project_config( + src_target = ':csslayout', +) diff --git a/ReactAndroid/src/main/java/com/facebook/jni/BUCK b/ReactAndroid/src/main/java/com/facebook/jni/BUCK new file mode 100644 index 000000000..220371dba --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/jni/BUCK @@ -0,0 +1,17 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'jni', + srcs = glob(['**/*.java']), + deps = [ + react_native_dep('java/com/facebook/proguard/annotations:annotations'), + react_native_dep('libraries/soloader/java/com/facebook/soloader:soloader'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':jni', +) diff --git a/ReactAndroid/src/main/java/com/facebook/perftest/BUCK b/ReactAndroid/src/main/java/com/facebook/perftest/BUCK new file mode 100644 index 000000000..655817f6e --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/perftest/BUCK @@ -0,0 +1,11 @@ +android_library( + name = 'perftest', + srcs = glob(['*.java']), + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':perftest', +) diff --git a/ReactAndroid/src/main/java/com/facebook/proguard/annotations/BUCK b/ReactAndroid/src/main/java/com/facebook/proguard/annotations/BUCK new file mode 100644 index 000000000..27de0b88a --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/proguard/annotations/BUCK @@ -0,0 +1,14 @@ +android_library( + name = 'annotations', + srcs = glob(['*.java']), + proguard_config = 'proguard_annotations.pro', + deps = [ + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':annotations', +) diff --git a/ReactAndroid/src/main/java/com/facebook/quicklog/BUCK b/ReactAndroid/src/main/java/com/facebook/quicklog/BUCK new file mode 100644 index 000000000..8bd1a243f --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/quicklog/BUCK @@ -0,0 +1,16 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'quicklog', + srcs = glob(['*.java']), + exported_deps = [ + react_native_dep('java/com/facebook/quicklog/identifiers:identifiers'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':quicklog', +) diff --git a/ReactAndroid/src/main/java/com/facebook/quicklog/identifiers/BUCK b/ReactAndroid/src/main/java/com/facebook/quicklog/identifiers/BUCK new file mode 100644 index 000000000..38d3b1bfa --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/quicklog/identifiers/BUCK @@ -0,0 +1,11 @@ +android_library( + name = 'identifiers', + srcs = glob(['*.java']), + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':identifiers', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/BUCK b/ReactAndroid/src/main/java/com/facebook/react/BUCK new file mode 100644 index 000000000..0cc6b1e0d --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/BUCK @@ -0,0 +1,28 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'react', + srcs = glob(['*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/react/devsupport:devsupport'), + react_native_target('java/com/facebook/react/modules/core:core'), + react_native_target('java/com/facebook/react/modules/debug:debug'), + react_native_target('java/com/facebook/react/modules/systeminfo:systeminfo'), + react_native_target('java/com/facebook/react/modules/toast:toast'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + 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/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':react', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/animation/BUCK b/ReactAndroid/src/main/java/com/facebook/react/animation/BUCK new file mode 100644 index 000000000..6a3307d02 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/animation/BUCK @@ -0,0 +1,18 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'animation', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_dep('third-party/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC' + ], +) + +project_config( + src_target = ':animation', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/bridge/BUCK b/ReactAndroid/src/main/java/com/facebook/react/bridge/BUCK new file mode 100644 index 000000000..43aaf9c5d --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/bridge/BUCK @@ -0,0 +1,42 @@ +include_defs('//ReactAndroid/DEFS') + +# We package the JS files from the bundler and local directory into what we +# pretend is an ordinary JAR file. By putting them under the assets/ directory +# within the zip file and relying on Buck to merge its contents into the APK, +# our JS bundles arrive in a place accessible by the AssetManager at runtime. + +python_binary( + name = 'package_js', + main = 'package_js.py', + visibility = [ + 'PUBLIC', + ], +) + +android_library( + name = 'bridge', + srcs = glob(['**/*.java']), + exported_deps = [ + react_native_dep('java/com/facebook/jni:jni'), + react_native_dep('java/com/facebook/proguard/annotations:annotations'), + ], + deps = [ + react_native_target('java/com/facebook/react/common:common'), + 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/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/jackson:core'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + react_native_dep('third-party/java/okio:okio'), + react_native_dep('third-party/java/okhttp:okhttp'), + react_native_dep('third-party/java/okhttp:okhttp-ws'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':bridge', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/common/BUCK b/ReactAndroid/src/main/java/com/facebook/react/common/BUCK new file mode 100644 index 000000000..e98c528e8 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/common/BUCK @@ -0,0 +1,32 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'common', + srcs = glob(['**/*.java']), + deps = [ + ':build_config', + react_native_dep('third-party/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + exported_deps = [ + react_native_dep('java/com/facebook/proguard/annotations:annotations'), + ], + visibility = [ + 'PUBLIC', + ], +) + +android_build_config( + name = 'build_config', + package = 'com.facebook.react', + values = [ + 'boolean IS_INTERNAL_BUILD = true', + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':common', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/BUCK b/ReactAndroid/src/main/java/com/facebook/react/devsupport/BUCK new file mode 100644 index 000000000..5f81485ca --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/BUCK @@ -0,0 +1,26 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'devsupport', + manifest = 'AndroidManifest.xml', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('res:devsupport'), + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/react/modules/debug:debug'), + 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'), + react_native_dep('third-party/java/okhttp:okhttp'), + react_native_dep('third-party/java/okio:okio'), + + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':devsupport', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/appstate/BUCK b/ReactAndroid/src/main/java/com/facebook/react/modules/appstate/BUCK new file mode 100644 index 000000000..27cc8a7cd --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/appstate/BUCK @@ -0,0 +1,21 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'appstate', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/react/modules/core:core'), + 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'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':appstate', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/camera/BUCK b/ReactAndroid/src/main/java/com/facebook/react/modules/camera/BUCK new file mode 100644 index 000000000..cede97b16 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/camera/BUCK @@ -0,0 +1,20 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'camera', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + 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'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':camera', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/clipboard/BUCK b/ReactAndroid/src/main/java/com/facebook/react/modules/clipboard/BUCK new file mode 100644 index 000000000..262b92ef2 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/clipboard/BUCK @@ -0,0 +1,20 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'clipboard', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + 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'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':clipboard', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/common/BUCK b/ReactAndroid/src/main/java/com/facebook/react/modules/common/BUCK new file mode 100644 index 000000000..ed2454fac --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/common/BUCK @@ -0,0 +1,20 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'common', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + 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'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':common', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/core/BUCK b/ReactAndroid/src/main/java/com/facebook/react/modules/core/BUCK new file mode 100644 index 000000000..2fff5f1ef --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/core/BUCK @@ -0,0 +1,22 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'core', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/react/devsupport:devsupport'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + 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'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':core', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/debug/BUCK b/ReactAndroid/src/main/java/com/facebook/react/modules/debug/BUCK new file mode 100644 index 000000000..a43da0d29 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/debug/BUCK @@ -0,0 +1,21 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'debug', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + 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'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':debug', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/BUCK b/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/BUCK new file mode 100644 index 000000000..45c6aeae9 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/BUCK @@ -0,0 +1,20 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'dialog', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_dep('third-party/android/support/v4:lib-support-v4'), + react_native_dep('third-party/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':dialog', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/fresco/BUCK b/ReactAndroid/src/main/java/com/facebook/react/modules/fresco/BUCK new file mode 100644 index 000000000..18cae1994 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/fresco/BUCK @@ -0,0 +1,29 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'fresco', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/modules/common:common'), + react_native_target('java/com/facebook/react/modules/network:network'), + react_native_dep('java/com/facebook/systrace:systrace'), + react_native_dep('libraries/fresco/fresco-react-native:fresco-react-native'), + react_native_dep('libraries/fresco/fresco-react-native:imagepipeline'), + react_native_dep('libraries/fresco/fresco-react-native:imagepipeline-okhttp'), + react_native_dep('libraries/soloader/java/com/facebook/soloader:soloader'), + react_native_dep('third-party/android/support-annotations:android-support-annotations'), + react_native_dep('third-party/android/support/v4:lib-support-v4'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + react_native_dep('third-party/java/okhttp:okhttp'), + react_native_dep('libraries/fresco/fresco-react-native:fbcore'), + react_native_dep('libraries/fresco/fresco-react-native:fresco-drawee'), +], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':fresco', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/intent/BUCK b/ReactAndroid/src/main/java/com/facebook/react/modules/intent/BUCK new file mode 100644 index 000000000..82c5b51b4 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/intent/BUCK @@ -0,0 +1,19 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'intent', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_dep('third-party/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':intent', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/location/BUCK b/ReactAndroid/src/main/java/com/facebook/react/modules/location/BUCK new file mode 100644 index 000000000..4fb39039c --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/location/BUCK @@ -0,0 +1,20 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'location', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/modules/core:core'), + react_native_target('java/com/facebook/react/common:common'), + react_native_dep('third-party/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':location', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/netinfo/BUCK b/ReactAndroid/src/main/java/com/facebook/react/modules/netinfo/BUCK new file mode 100644 index 000000000..0a23937ba --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/netinfo/BUCK @@ -0,0 +1,22 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'netinfo', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/modules/core:core'), + react_native_target('java/com/facebook/react/common:common'), + react_native_dep('libraries/fbcore/src/main/java/com/facebook/common/logging:logging'), + react_native_dep('third-party/android/support/v4:lib-support-v4'), + react_native_dep('third-party/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':netinfo', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/network/BUCK b/ReactAndroid/src/main/java/com/facebook/react/modules/network/BUCK new file mode 100644 index 000000000..254326d6a --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/network/BUCK @@ -0,0 +1,26 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'network', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/modules/core:core'), + react_native_target('java/com/facebook/react/common:common'), + react_native_dep('libraries/fbcore/src/main/java/com/facebook/common/logging:logging'), + react_native_dep('third-party/android/support/v4:lib-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:okhttp'), + react_native_dep('third-party/java/okio:okio'), + react_native_dep('third-party/java/stetho:stetho'), + react_native_dep('third-party/java/stetho:stetho-okhttp'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':network', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/storage/BUCK b/ReactAndroid/src/main/java/com/facebook/react/modules/storage/BUCK new file mode 100644 index 000000000..b9d5d418c --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/storage/BUCK @@ -0,0 +1,21 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'storage', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/react/modules/common:common'), + 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'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':storage', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/BUCK b/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/BUCK new file mode 100644 index 000000000..a7be01fc4 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/BUCK @@ -0,0 +1,19 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'systeminfo', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_dep('third-party/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':systeminfo', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/toast/BUCK b/ReactAndroid/src/main/java/com/facebook/react/modules/toast/BUCK new file mode 100644 index 000000000..fdfec87eb --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/toast/BUCK @@ -0,0 +1,19 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'toast', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_dep('third-party/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':toast', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/BUCK b/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/BUCK new file mode 100644 index 000000000..6289e0598 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/BUCK @@ -0,0 +1,24 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'websocket', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/react/modules/core:core'), + 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'), + react_native_dep('third-party/java/okhttp:okhttp-ws'), + react_native_dep('third-party/java/okhttp:okhttp'), + react_native_dep('third-party/java/okio:okio'), +], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':websocket', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/processing/BUCK b/ReactAndroid/src/main/java/com/facebook/react/processing/BUCK new file mode 100644 index 000000000..e057630de --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/processing/BUCK @@ -0,0 +1,22 @@ +include_defs('//ReactAndroid/DEFS') + +java_library( + name = 'processing', + srcs = glob(['*.java']), + source = '7', + target = '7', + deps = [ + react_native_target('java/com/facebook/react/uimanager/annotations:annotations'), + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_dep('third-party/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/javapoet:javapoet'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility=[ + 'PUBLIC' + ] +) + +project_config( + src_target = ':processing', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/shell/BUCK b/ReactAndroid/src/main/java/com/facebook/react/shell/BUCK new file mode 100644 index 000000000..193749ddf --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/shell/BUCK @@ -0,0 +1,54 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'shell', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('res:shell'), + react_native_target('java/com/facebook/react:react'), + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/react/devsupport:devsupport'), + react_native_target('java/com/facebook/react/views/art:art'), + react_native_target('java/com/facebook/react/views/drawer:drawer'), + react_native_target('java/com/facebook/react/views/image:image'), + react_native_target('java/com/facebook/react/views/picker:picker'), + react_native_target('java/com/facebook/react/views/progressbar:progressbar'), + react_native_target('java/com/facebook/react/views/recyclerview:recyclerview'), + react_native_target('java/com/facebook/react/views/scroll:scroll'), + react_native_target('java/com/facebook/react/views/swiperefresh:swiperefresh'), + react_native_target('java/com/facebook/react/views/switchview:switchview'), + react_native_target('java/com/facebook/react/views/text:text'), + react_native_target('java/com/facebook/react/views/textinput:textinput'), + react_native_target('java/com/facebook/react/views/toolbar:toolbar'), + react_native_target('java/com/facebook/react/views/view:view'), + react_native_target('java/com/facebook/react/views/viewpager:viewpager'), + react_native_target('java/com/facebook/react/views/webview:webview'), + react_native_target('java/com/facebook/react/modules/appstate:appstate'), + react_native_target('java/com/facebook/react/modules/camera:camera'), + react_native_target('java/com/facebook/react/modules/clipboard:clipboard'), + react_native_target('java/com/facebook/react/modules/core:core'), + react_native_target('java/com/facebook/react/modules/debug:debug'), + react_native_target('java/com/facebook/react/modules/dialog:dialog'), + react_native_target('java/com/facebook/react/modules/fresco:fresco'), + react_native_target('java/com/facebook/react/modules/intent:intent'), + react_native_target('java/com/facebook/react/modules/location:location'), + react_native_target('java/com/facebook/react/modules/netinfo:netinfo'), + react_native_target('java/com/facebook/react/modules/network:network'), + react_native_target('java/com/facebook/react/modules/storage:storage'), + react_native_target('java/com/facebook/react/modules/toast:toast'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + react_native_target('java/com/facebook/react/modules/websocket:websocket'), + 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/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':shell', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/touch/BUCK b/ReactAndroid/src/main/java/com/facebook/react/touch/BUCK new file mode 100644 index 000000000..44cea8fdc --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/touch/BUCK @@ -0,0 +1,17 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'touch', + srcs = glob(['**/*.java']), + deps = [ + react_native_dep('third-party/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC' + ], +) + +project_config( + src_target = ':touch', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK new file mode 100644 index 000000000..b39e66c92 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/BUCK @@ -0,0 +1,31 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'uimanager', + srcs = glob([ + '*.java', + 'debug/*.java', + 'events/*.java', + 'layoutanimation/*.java' + ]), + deps = [ + react_native_target('java/com/facebook/react/animation:animation'), + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/react/uimanager/annotations:annotations'), + react_native_target('java/com/facebook/csslayout:csslayout'), + react_native_target('java/com/facebook/react/touch:touch'), + 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/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + react_native_dep('third-party/android/support/v4:lib-support-v4'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':uimanager', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/annotations/BUCK b/ReactAndroid/src/main/java/com/facebook/react/uimanager/annotations/BUCK new file mode 100644 index 000000000..6ec00fd33 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/annotations/BUCK @@ -0,0 +1,16 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'annotations', + srcs = glob(['*.java']), + deps = [ + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':annotations', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/art/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/art/BUCK new file mode 100644 index 000000000..d7612a1e4 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/views/art/BUCK @@ -0,0 +1,22 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'art', + srcs = glob(['*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/csslayout:csslayout'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + react_native_target('java/com/facebook/react/uimanager/annotations:annotations'), + react_native_dep('libraries/fbcore/src/main/java/com/facebook/common/logging:logging'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':art', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/drawer/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/drawer/BUCK new file mode 100644 index 000000000..6698d3393 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/views/drawer/BUCK @@ -0,0 +1,23 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'drawer', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/csslayout:csslayout'), + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + react_native_target('java/com/facebook/react/uimanager/annotations:annotations'), + react_native_target('java/com/facebook/react/views/scroll:scroll'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + react_native_dep('third-party/android/support/v4:lib-support-v4'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':drawer', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/image/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/image/BUCK new file mode 100644 index 000000000..abafb1b59 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/views/image/BUCK @@ -0,0 +1,26 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'image', + srcs = glob(['*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + react_native_target('java/com/facebook/react/uimanager/annotations:annotations'), + react_native_dep('libraries/fresco/fresco-react-native:fbcore'), + react_native_dep('libraries/fresco/fresco-react-native:fresco-react-native'), + react_native_dep('libraries/fresco/fresco-react-native:fresco-drawee'), + react_native_dep('libraries/fresco/fresco-react-native:imagepipeline'), + react_native_dep('third-party/android/support/v4:lib-support-v4'), + react_native_dep('third-party/android/support-annotations:android-support-annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), +], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':image', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/picker/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/picker/BUCK new file mode 100644 index 000000000..24ab25dbb --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/views/picker/BUCK @@ -0,0 +1,21 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'picker', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + react_native_target('java/com/facebook/react/uimanager/annotations:annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + react_native_dep('third-party/java/infer-annotations:infer-annotations'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':picker', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/progressbar/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/progressbar/BUCK new file mode 100644 index 000000000..fed1ed6a0 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/views/progressbar/BUCK @@ -0,0 +1,22 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'progressbar', + srcs = glob(['*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/csslayout:csslayout'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + react_native_target('java/com/facebook/react/uimanager/annotations:annotations'), + react_native_dep('third-party/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':progressbar', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/recyclerview/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/recyclerview/BUCK new file mode 100644 index 000000000..1457bc8e6 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/views/recyclerview/BUCK @@ -0,0 +1,26 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'recyclerview', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/react/touch:touch'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + react_native_target('java/com/facebook/react/uimanager/annotations:annotations'), + react_native_target('java/com/facebook/react/views/scroll:scroll'), + react_native_target('java/com/facebook/react/views/view:view'), + react_native_dep('third-party/android/support/v4:lib-support-v4'), + react_native_dep('third-party/android/support/v7/recyclerview:recyclerview'), + react_native_dep('third-party/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':recyclerview', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/scroll/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/BUCK new file mode 100644 index 000000000..22caa2763 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/views/scroll/BUCK @@ -0,0 +1,24 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'scroll', + srcs = glob(['*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/react/views/view:view'), + react_native_target('java/com/facebook/react/touch:touch'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + react_native_target('java/com/facebook/react/uimanager/annotations:annotations'), + 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/android/support/v4:lib-support-v4'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':scroll', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/BUCK new file mode 100644 index 000000000..214d47a55 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/BUCK @@ -0,0 +1,22 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'swiperefresh', + srcs = glob(['*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + react_native_target('java/com/facebook/react/uimanager/annotations:annotations'), + react_native_target('java/com/facebook/react/views/scroll:scroll'), + react_native_dep('third-party/android/support/v4:lib-support-v4'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':swiperefresh', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/switchview/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/switchview/BUCK new file mode 100644 index 000000000..1ac7f3c79 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/views/switchview/BUCK @@ -0,0 +1,22 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'switchview', + srcs = glob(['*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/csslayout:csslayout'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + react_native_target('java/com/facebook/react/uimanager/annotations:annotations'), + react_native_dep('third-party/android-support-for-standalone-apps/v7/appcompat:appcompat-23.1'), + react_native_dep('third-party/android-support-for-standalone-apps/v7/appcompat:res-for-react-native'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':switchview', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/text/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/text/BUCK new file mode 100644 index 000000000..df5bd7dee --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/views/text/BUCK @@ -0,0 +1,26 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'text', + srcs = glob(['*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/csslayout:csslayout'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + react_native_target('java/com/facebook/react/uimanager/annotations:annotations'), + react_native_dep('libraries/fresco/fresco-react-native:fbcore'), + react_native_dep('libraries/fresco/fresco-react-native:fresco-react-native'), + react_native_dep('libraries/fresco/fresco-react-native:fresco-drawee'), + react_native_dep('libraries/fresco/fresco-react-native:imagepipeline'), + react_native_dep('third-party/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':text', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/textinput/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/BUCK new file mode 100644 index 000000000..925dc15d3 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/views/textinput/BUCK @@ -0,0 +1,24 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'textinput', + srcs = glob(['*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/react/views/text:text'), + react_native_target('java/com/facebook/csslayout:csslayout'), + react_native_target('java/com/facebook/react/modules/core:core'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + react_native_target('java/com/facebook/react/uimanager/annotations:annotations'), + react_native_dep('third-party/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':textinput', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/toolbar/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/toolbar/BUCK new file mode 100644 index 000000000..253f3576a --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/views/toolbar/BUCK @@ -0,0 +1,27 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'toolbar', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/csslayout:csslayout'), + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + react_native_target('java/com/facebook/react/uimanager/annotations:annotations'), + react_native_dep('libraries/fresco/fresco-react-native:fresco-react-native'), + react_native_dep('libraries/fresco/fresco-react-native:fresco-drawee'), + react_native_dep('libraries/fresco/fresco-react-native:imagepipeline'), + react_native_dep('third-party/android-support-for-standalone-apps/v7/appcompat:appcompat-23.1'), + react_native_dep('third-party/android-support-for-standalone-apps/v7/appcompat:res-for-react-native'), + react_native_dep('third-party/android/support/v4:lib-support-v4'), + react_native_dep('third-party/java/jsr-305:jsr-305'), +], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':toolbar', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/view/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/view/BUCK new file mode 100644 index 000000000..dc06dec18 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/views/view/BUCK @@ -0,0 +1,23 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'view', + srcs = glob(['*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/csslayout:csslayout'), + react_native_target('java/com/facebook/react/touch:touch'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + react_native_target('java/com/facebook/react/uimanager/annotations:annotations'), + react_native_dep('third-party/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':view', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/BUCK new file mode 100644 index 000000000..23bcd06f3 --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/views/viewpager/BUCK @@ -0,0 +1,23 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'viewpager', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + react_native_target('java/com/facebook/react/uimanager/annotations:annotations'), + react_native_target('java/com/facebook/react/views/scroll:scroll'), + react_native_dep('third-party/android/support/v4:lib-support-v4'), + react_native_dep('third-party/java/infer-annotations:infer-annotations'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':viewpager', +) diff --git a/ReactAndroid/src/main/java/com/facebook/react/views/webview/BUCK b/ReactAndroid/src/main/java/com/facebook/react/views/webview/BUCK new file mode 100644 index 000000000..8da222d8d --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/react/views/webview/BUCK @@ -0,0 +1,20 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'webview', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + react_native_target('java/com/facebook/react/uimanager/annotations:annotations'), + react_native_target('java/com/facebook/react/common:common'), + react_native_dep('third-party/java/jsr-305:jsr-305'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':webview', +) diff --git a/ReactAndroid/src/main/java/com/facebook/systrace/BUCK b/ReactAndroid/src/main/java/com/facebook/systrace/BUCK new file mode 100644 index 000000000..6d222bb2a --- /dev/null +++ b/ReactAndroid/src/main/java/com/facebook/systrace/BUCK @@ -0,0 +1,11 @@ +android_library( + name = 'systrace', + srcs = glob(['*.java']), + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':systrace', +) diff --git a/ReactAndroid/src/main/jni/first-party/fb/BUCK b/ReactAndroid/src/main/jni/first-party/fb/BUCK new file mode 100644 index 000000000..2890f37a1 --- /dev/null +++ b/ReactAndroid/src/main/jni/first-party/fb/BUCK @@ -0,0 +1,28 @@ +include_defs('//ReactAndroid/DEFS') + +cxx_library( + name = 'fb', + soname = 'libfb.so', + srcs = [ + 'assert.cpp', + 'log.cpp', + ], + header_namespace='fb', + exported_headers=subdir_glob([ + ('', '*.h'), + ('include/fb', '*.h'), + ]), + preprocessor_flags=[ + '-DLOG_TAG="libfb"', + ], + # We want to use this library during bootstrap + can_be_asset = False, + deps = [ + react_native_target('jni/third-party/android-ndk:android'), + react_native_target('jni/third-party/android-ndk:log'), + react_native_target('jni/third-party/glibc:dl'), + ], + visibility = [ + 'PUBLIC' + ], +) \ No newline at end of file diff --git a/ReactAndroid/src/main/jni/first-party/jni/BUCK b/ReactAndroid/src/main/jni/first-party/jni/BUCK new file mode 100644 index 000000000..56d891234 --- /dev/null +++ b/ReactAndroid/src/main/jni/first-party/jni/BUCK @@ -0,0 +1,50 @@ +include_defs('//ReactAndroid/DEFS') + +cxx_library( + name = 'jni', + srcs = [ + 'Countable.cpp', + 'Environment.cpp', + 'fbjni.cpp', + 'jni_helpers.cpp', + 'LocalString.cpp', + 'OnLoad.cpp', + 'WeakReference.cpp', + 'fbjni/Exceptions.cpp', + 'fbjni/Hybrid.cpp', + 'fbjni/References.cpp', + ], + platform_srcs = [ + (r'.*\bandroid\b.*', [ + 'fbjni/android/ReferenceChecking.cpp', + ]), + ], + exported_headers = glob(['*.h', 'fbjni/*.h']), + header_namespace = 'jni', + soname = 'libfbjni.so', + preprocessor_flags = [ + '-fexceptions', + '-DLOG_TAG="fbjni"', + ], + compiler_flags = [ + '-fexceptions', + '-frtti', + ], + # We want to use this library during bootstrap + can_be_asset = False, + exported_deps = [ + react_native_target('jni/first-party/fb:fb'), + react_native_target('jni/third-party/android-ndk:log'), + ], + deps = [ + # TODO Is this needed? Not used in the Gradle build. + # '//native/jni-hack:jni-hack', + # TODO should be react_native_target('java/com/facebook/jni:jni') but might not be needed as the bridge already depends on it. + # '//native/jni/java:java', + ], + visibility = ['PUBLIC'], +) + +project_config( + src_target = ':jni', +) diff --git a/ReactAndroid/src/main/jni/react/BUCK b/ReactAndroid/src/main/jni/react/BUCK new file mode 100644 index 000000000..39e35cfe2 --- /dev/null +++ b/ReactAndroid/src/main/jni/react/BUCK @@ -0,0 +1,74 @@ +include_defs('//ReactAndroid/DEFS') + +# We depend on JSC, support the same platforms +SUPPORTED_PLATFORMS = '^android-(armv7|x86)$' + +DEPS = [ + '//native/fb:fb', + '//native/jni:jni', + '//native/third-party/android-ndk:android', + '//xplat/fbsystrace:fbsystrace', + '//xplat/folly:molly', +] + +PREPROCESSOR_FLAGS = [ + '-DLOG_TAG="ReactNative"', + '-DWITH_JSC_EXTRA_TRACING=1', + '-DWITH_FBSYSTRACE=1', +] + +def react_library(**kwargs): + cxx_library( + name = 'react', + visibility = [ + react_native_target('jni/react/jni:jni'), + ], + deps = DEPS + [ + '//native/third-party/jsc:jsc', + '//native/third-party/jsc:jsc_legacy_profiler', + ], + preprocessor_flags = PREPROCESSOR_FLAGS, + **kwargs + ) + +react_library( + soname = 'libreactnative.so', + header_namespace = 'react', + supported_platforms_regex = SUPPORTED_PLATFORMS, + force_static = True, + srcs = [ + 'Bridge.cpp', + 'JSModulesUnbundle.cpp', + 'Value.cpp', + 'MethodCall.cpp', + 'JSCHelpers.cpp', + 'JSCExecutor.cpp', + 'JSCTracing.cpp', + 'JSCMemory.cpp', + 'JSCPerfLogging.cpp', + 'JSCLegacyProfiler.cpp', + 'JSCWebWorker.cpp', + ], + headers = [ + 'JSCTracing.h', + 'JSCPerfLogging.h', + 'JSCLegacyProfiler.h', + 'JSCMemory.h' + ], + exported_headers = [ + 'Bridge.h', + 'Executor.h', + 'JSCExecutor.h', + 'JSCHelpers.h', + 'JSCWebWorker.h', + 'MethodCall.h', + 'JSModulesUnbundle.h', + 'Value.h', + ], + compiler_flags = [ + '-Wall', + '-std=c++11', + '-fexceptions', + '-fvisibility=hidden', + ], +) diff --git a/ReactAndroid/src/main/jni/react/jni/BUCK b/ReactAndroid/src/main/jni/react/jni/BUCK new file mode 100644 index 000000000..d29ea7dc6 --- /dev/null +++ b/ReactAndroid/src/main/jni/react/jni/BUCK @@ -0,0 +1,64 @@ +include_defs('//ReactAndroid/DEFS') + +# We depend on JSC, support the same platforms +SUPPORTED_PLATFORMS = '^android-(armv7|x86)$' + +DEPS = [ + '//native/jni:jni', + '//xplat/folly:molly', +] + +def jni_library(**kwargs): + cxx_library( + name='jni', + visibility = [ + 'PUBLIC', + ], + deps = DEPS + [ + react_native_target('jni/react:react'), + '//native/third-party/jsc:jsc', + '//native/third-party/jsc:jsc_legacy_profiler', + ], + **kwargs + ) + +jni_library( + soname = 'libreactnativejni.so', + header_namespace = 'react/jni', + supported_platforms_regex = SUPPORTED_PLATFORMS, + srcs = [ + 'JMessageQueueThread.cpp', + 'JSLoader.cpp', + 'NativeArray.cpp', + 'OnLoad.cpp', + 'ProxyExecutor.cpp', + ], + headers = [ + 'JSLoader.h', + 'ProxyExecutor.h', + ], + exported_headers = [ + 'JMessageQueueThread.h', + 'JNativeRunnable.h', + 'NativeArray.h', + 'ReadableNativeArray.h', + 'WebWorkers.h', + ], + preprocessor_flags = [ + '-DLOG_TAG="ReactNativeJNI"', + '-DWITH_FBSYSTRACE=1', + '-DWITH_FBJSCEXTENSIONS=1', + ], + compiler_flags = [ + '-Wall', + '-Werror', + '-fexceptions', + '-std=c++11', + '-fvisibility=hidden', + '-frtti', + ], +) + +project_config( + src_target = ':jni', +) diff --git a/ReactAndroid/src/main/jni/react/perftests/BUCK b/ReactAndroid/src/main/jni/react/perftests/BUCK new file mode 100644 index 000000000..2b0c46a7c --- /dev/null +++ b/ReactAndroid/src/main/jni/react/perftests/BUCK @@ -0,0 +1,21 @@ +include_defs('//ReactAndroid/DEFS') + +cxx_library( + name = 'perftests', + srcs = [ 'OnLoad.cpp' ], + soname = 'libreactnativetests.so', + preprocessor_flags = [ + '-DLOG_TAG=\"ReactPerftests\"', + ], + deps = [ + '//native:base', + '//native/jni:jni', + ], + visibility = [ + '//instrumentation_tests/com/facebook/catalyst/...', + ], +) + +project_config( + src_target = ':perftests', +) diff --git a/ReactAndroid/src/main/jni/third-party/android-ndk/BUCK b/ReactAndroid/src/main/jni/third-party/android-ndk/BUCK new file mode 100644 index 000000000..eb32890cc --- /dev/null +++ b/ReactAndroid/src/main/jni/third-party/android-ndk/BUCK @@ -0,0 +1,24 @@ +# NOTE(agallagher): The platform should really be responsible for providing +# this type of implicit dependency. As it is now, we need to setup a dummy +# rules to model the Android NDK's built in libraries. + +LIBS = ( + 'android', + 'EGL', + 'GLESv2', + 'jnigraphics', + 'log', + 'z', +) + +for lib in LIBS: + prebuilt_cxx_library( + name = lib, + header_only = True, + exported_platform_linker_flags = [ + ('android.*', ['-l' + lib]), + ], + visibility = [ + 'PUBLIC', + ], + ) \ No newline at end of file diff --git a/ReactAndroid/src/main/jni/third-party/glibc/BUCK b/ReactAndroid/src/main/jni/third-party/glibc/BUCK new file mode 100644 index 000000000..847eed271 --- /dev/null +++ b/ReactAndroid/src/main/jni/third-party/glibc/BUCK @@ -0,0 +1,52 @@ +# NOTE(agallagher): The platform really should be responsible for providing +# this type of provided dependency. As it is now, we need to setup dummy +# rules to model glibc's libraries. + +# libpthread is implicitly included in the android runtime so, when building +# on an android platform, we don't do anything. +prebuilt_cxx_library( + name = 'pthread', + header_only = True, + exported_platform_linker_flags = [ + ('android', []), + ('default', ['-lpthread']), + ('static', ['-lpthread']), + ], + visibility = [ + 'PUBLIC', + ], +) + +prebuilt_cxx_library( + name = 'dl', + header_only = True, + exported_linker_flags = [ + '-ldl', + ], + visibility = [ + 'PUBLIC', + ], +) + +prebuilt_cxx_library( + name = 'm', + header_only = True, + exported_linker_flags = [ + '-lm', + ], + visibility = [ + 'PUBLIC', + ], +) + +prebuilt_cxx_library( + name = 'rt', + header_only = True, + exported_platform_linker_flags = [ + ('android', []), # Empty, since `-lc` is implicit + ('default', ['-lrt']), + ], + visibility = [ + 'PUBLIC', + ], +) \ No newline at end of file diff --git a/ReactAndroid/src/main/libraries/fbcore/src/main/java/com/facebook/common/logging/BUCK b/ReactAndroid/src/main/libraries/fbcore/src/main/java/com/facebook/common/logging/BUCK new file mode 100644 index 000000000..cf2210851 --- /dev/null +++ b/ReactAndroid/src/main/libraries/fbcore/src/main/java/com/facebook/common/logging/BUCK @@ -0,0 +1,11 @@ +android_prebuilt_aar( + name = 'logging', + aar = ':fbcore-binary-aar', + visibility = ['//ReactAndroid/...'], +) + +remote_file( + name = 'fbcore-binary-aar', + url = 'mvn:com.facebook.fresco:fbcore:aar:0.8.1', + sha1 = 'cc46b3d564139bf63bb41534c7a723ee8119ae5f', +) diff --git a/ReactAndroid/src/main/libraries/fbcore/src/test/java/com/facebook/powermock/BUCK b/ReactAndroid/src/main/libraries/fbcore/src/test/java/com/facebook/powermock/BUCK new file mode 100644 index 000000000..7bb6f6802 --- /dev/null +++ b/ReactAndroid/src/main/libraries/fbcore/src/test/java/com/facebook/powermock/BUCK @@ -0,0 +1,73 @@ +android_library( + name = 'powermock', + exported_deps = [ + ':powermock-api-mockito', + ':powermock-api-support', + ':powermock-module-junit4-rule', + ':powermock-classloading-xstream', + ':powermock-core', + ], + visibility = ['//ReactAndroid/...',], +) + +prebuilt_jar( + name = 'powermock-core', + binary_jar = ':download-powermock-core', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'download-powermock-core', + url = 'mvn:org.powermock:powermock-core:jar:1.6.2', + sha1 = 'ea04e79244e19dcf0c3ccf6863c5b028b4b58c9c', +) + +prebuilt_jar( + name = 'powermock-api-mockito', + binary_jar = ':download-powermock-api-mockito', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'download-powermock-api-mockito', + url = 'mvn:org.powermock:powermock-api-mockito:jar:1.6.2', + sha1 = 'c213230ae20a7b422f3d622a261d0e3427d2464c', +) + +prebuilt_jar( + name = 'powermock-api-support', + binary_jar = ':download-powermock-api-support', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'download-powermock-api-support', + url = 'mvn:org.powermock:powermock-api-support:jar:1.6.2', + sha1 = '93b21413b4ee99b7bc0dd34e1416fdca96866aaf', +) + +prebuilt_jar( + name = 'powermock-module-junit4-rule', + binary_jar = ':download-powermock-module-junit4-rule', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'download-powermock-module-junit4-rule', + url = 'mvn:org.powermock:powermock-module-junit4-rule:jar:1.6.2', + sha1 = '4847638c5729b9f203e21144b0bdb5d34d888473', +) + +prebuilt_jar( + name = 'powermock-classloading-xstream', + binary_jar = ':download-powermock-classloading-xstream', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'download-powermock-classloading-xstream', + url = 'mvn:org.powermock:powermock-classloading-xstream:jar:1.6.2', + sha1 = '3ced31cd7024fe365b9f3c8082d22c02434577da', +) + + diff --git a/ReactAndroid/src/main/libraries/fresco/fresco-react-native/BUCK b/ReactAndroid/src/main/libraries/fresco/fresco-react-native/BUCK new file mode 100644 index 000000000..9c618db04 --- /dev/null +++ b/ReactAndroid/src/main/libraries/fresco/fresco-react-native/BUCK @@ -0,0 +1,59 @@ +android_prebuilt_aar( + name = 'fresco-react-native', + aar = ':fresco-binary-aar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'fresco-binary-aar', + url = 'mvn:com.facebook.fresco:fresco:aar:0.8.1', + sha1 = 'f0a4f04318123e1597514b2abf56b7e66581f3f8', +) + +android_prebuilt_aar( + name = 'fresco-drawee', + aar = ':drawee-binary-aar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'drawee-binary-aar', + url = 'mvn:com.facebook.fresco:drawee:aar:0.8.1', + sha1 = 'a944015ddf50fdad79302e42a85a351633c24472', +) + +android_prebuilt_aar( + name = 'imagepipeline', + aar = ':imagepipeline-aar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'imagepipeline-aar', + url = 'mvn:com.facebook.fresco:imagepipeline:aar:0.8.1', + sha1 = '93fe3e629c03aea8f63dabd80a0e616b0caef65b', +) + +android_prebuilt_aar( + name = 'fbcore', + aar = ':fbcore-aar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'fbcore-aar', + url = 'mvn:com.facebook.fresco:fbcore:aar:0.8.1', + sha1 = 'cc46b3d564139bf63bb41534c7a723ee8119ae5f', +) + +android_prebuilt_aar( + name = 'imagepipeline-okhttp', + aar = ':imagepipeline-okhttp-binary-aar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'imagepipeline-okhttp-binary-aar', + url = 'mvn:com.facebook.fresco:imagepipeline-okhttp:aar:0.8.1', + sha1 = 'd6b16dbaab8b810620347355a425fb2982e33ef8', +) diff --git a/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/BUCK b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/BUCK new file mode 100644 index 000000000..322ba2204 --- /dev/null +++ b/ReactAndroid/src/main/libraries/soloader/java/com/facebook/soloader/BUCK @@ -0,0 +1,20 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'soloader', + srcs = glob(['*.java']), + proguard_config = 'soloader.pro', + deps = [ + react_native_dep('third-party/java/jsr-305:jsr-305'), + # Be very careful adding new dependencies here, because this code + # has to run very early in the app startup process. + # Definitely do *not* depend on lib-base or guava. + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':soloader', +) diff --git a/ReactAndroid/src/main/res/BUCK b/ReactAndroid/src/main/res/BUCK new file mode 100644 index 000000000..90f796a13 --- /dev/null +++ b/ReactAndroid/src/main/res/BUCK @@ -0,0 +1,19 @@ +include_defs('//ReactAndroid/DEFS') + +android_resource( + name = 'devsupport', + res = 'devsupport', + package = 'com.facebook.react', + visibility = [ + react_native_target('java/com/facebook/react/devsupport/...'), + ], +) + +android_resource( + name = 'shell', + res = 'shell', + package = 'com.facebook.react', + visibility = [ + 'PUBLIC', + ], +) diff --git a/ReactAndroid/src/main/third-party/android-support-for-standalone-apps/v7/appcompat/BUCK b/ReactAndroid/src/main/third-party/android-support-for-standalone-apps/v7/appcompat/BUCK new file mode 100644 index 000000000..626b8dcda --- /dev/null +++ b/ReactAndroid/src/main/third-party/android-support-for-standalone-apps/v7/appcompat/BUCK @@ -0,0 +1,36 @@ +android_prebuilt_aar( + name = 'appcompat-23.1', + aar = ':appcompat-binary-aar', + visibility = ['//ReactAndroid/...',], +) + +# Unpack resources from the appcompat aar and merge their ids into the +# generated com.facebook.react.R class. +# +# We do this for compatibility with Gradle: we build the open source +# version React Native with both Buck and Gradle. See for example +# ReactToolbarManager.java where we access the appcompat resources +# via com.facebook.react.R. +android_resource( + name = 'res-for-react-native', + res = ':res-unpacker-cmd', + package = 'com.facebook.react', + visibility = ['//ReactAndroid/...',], +) + +genrule( + name = 'res-unpacker-cmd', + cmd = '$(exe :res-unpacker) $(location :appcompat-binary-aar) $OUT', + out = 'res', +) + +python_binary( + name = 'res-unpacker', + main = 'res-unpacker.py', +) + +remote_file( + name = 'appcompat-binary-aar', + url = 'mvn:com.android.support:appcompat-v7:aar:23.0.1', + sha1 = '7d659f671541394a8bc2b9f909950aa2a5ec87ff', +) diff --git a/ReactAndroid/src/main/third-party/android/support-annotations/BUCK b/ReactAndroid/src/main/third-party/android/support-annotations/BUCK new file mode 100644 index 000000000..0043bf0ce --- /dev/null +++ b/ReactAndroid/src/main/third-party/android/support-annotations/BUCK @@ -0,0 +1,11 @@ +prebuilt_jar( + name = 'android-support-annotations', + binary_jar = ':support-annotations-binary-aar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'support-annotations-binary-aar', + url = 'mvn:com.android.support:support-annotations:jar:22.2.0', + sha1 = '66b42a1f3eb7676070b7ef7f14b603483aecbee1', +) diff --git a/ReactAndroid/src/main/third-party/android/support/v4/BUCK b/ReactAndroid/src/main/third-party/android/support/v4/BUCK new file mode 100644 index 000000000..b0a85e26b --- /dev/null +++ b/ReactAndroid/src/main/third-party/android/support/v4/BUCK @@ -0,0 +1,23 @@ +android_prebuilt_aar( + name = 'lib-support-v4', + aar = ':lib-support-v4-binary-aar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'lib-support-v4-binary-aar', + url = 'mvn:com.android.support:support-v4:aar:23.0.1', + sha1 = '9e8da0e4ecf9f63258c7fbd273889252cba2d0c3', +) + +prebuilt_jar( + name = 'lib-support-annotations', + binary_jar = ':lib-support-annotations-binary-aar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'lib-support-annotations-binary-aar', + url = 'mvn:com.android.support:support-annotations:jar:22.2.0', + sha1 = '66b42a1f3eb7676070b7ef7f14b603483aecbee1', +) diff --git a/ReactAndroid/src/main/third-party/android/support/v7/recyclerview/BUCK b/ReactAndroid/src/main/third-party/android/support/v7/recyclerview/BUCK new file mode 100644 index 000000000..806248672 --- /dev/null +++ b/ReactAndroid/src/main/third-party/android/support/v7/recyclerview/BUCK @@ -0,0 +1,13 @@ +android_prebuilt_aar( + name = 'recyclerview', + aar = ':recyclerview-binary-aar', + visibility = [ + '//ReactAndroid/...', + ], +) + +remote_file( + name = 'recyclerview-binary-aar', + url = 'mvn:com.android.support:recyclerview-v7:aar:23.0.1', + sha1 = '94d5f16be156521e135295e2ffa70d79ef8ad9d5', +) diff --git a/ReactAndroid/src/main/third-party/java/fest/BUCK b/ReactAndroid/src/main/third-party/java/fest/BUCK new file mode 100644 index 000000000..b802709c6 --- /dev/null +++ b/ReactAndroid/src/main/third-party/java/fest/BUCK @@ -0,0 +1,11 @@ +prebuilt_jar( + name = 'fest', + binary_jar = ':fest-binary-jar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'fest-binary-jar', + url = 'mvn:org.easytesting:fest-assert-core:jar:2.0M10', + sha1 = 'cb7c91cf614901928ae405f19d9bcdedf82781db', +) diff --git a/ReactAndroid/src/main/third-party/java/infer-annotations/BUCK b/ReactAndroid/src/main/third-party/java/infer-annotations/BUCK new file mode 100644 index 000000000..2eabc6be2 --- /dev/null +++ b/ReactAndroid/src/main/third-party/java/infer-annotations/BUCK @@ -0,0 +1,5 @@ +prebuilt_jar( + name = 'infer-annotations', + binary_jar = 'infer-annotations-1.5.jar', + visibility = ['//ReactAndroid/...'], +) diff --git a/ReactAndroid/src/main/third-party/java/jackson/BUCK b/ReactAndroid/src/main/third-party/java/jackson/BUCK new file mode 100644 index 000000000..818c52c8a --- /dev/null +++ b/ReactAndroid/src/main/third-party/java/jackson/BUCK @@ -0,0 +1,11 @@ +prebuilt_jar( + name = 'core', + binary_jar = ':jackson-core-binary-jar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'jackson-core-binary-jar', + url = 'mvn:com.fasterxml.jackson.core:jackson-core:jar:2.2.3', + sha1 = '1a0113da2cab5f4c216b4e5e7c1dbfaa67087e14', +) diff --git a/ReactAndroid/src/main/third-party/java/javapoet/BUCK b/ReactAndroid/src/main/third-party/java/javapoet/BUCK new file mode 100644 index 000000000..d16df03bf --- /dev/null +++ b/ReactAndroid/src/main/third-party/java/javapoet/BUCK @@ -0,0 +1,11 @@ +prebuilt_jar( + name = 'javapoet', + binary_jar = ':jsr305-binary-jar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'jsr305-binary-jar', + url = 'mvn:com.squareup:javapoet:jar:1.2.0', + sha1 = 'ad3ba65c1788f4d814a4da056323e2b84412fb3c', +) diff --git a/ReactAndroid/src/main/third-party/java/jsr-305/BUCK b/ReactAndroid/src/main/third-party/java/jsr-305/BUCK new file mode 100644 index 000000000..3b5bb0b0e --- /dev/null +++ b/ReactAndroid/src/main/third-party/java/jsr-305/BUCK @@ -0,0 +1,11 @@ +prebuilt_jar( + name = 'jsr-305', + binary_jar = ':jsr305-binary-jar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'jsr305-binary-jar', + url = 'mvn:com.google.code.findbugs:jsr305:jar:3.0.0', + sha1 = '5871fb60dc68d67da54a663c3fd636a10a532948', +) diff --git a/ReactAndroid/src/main/third-party/java/junit/BUCK b/ReactAndroid/src/main/third-party/java/junit/BUCK new file mode 100644 index 000000000..c5f67b010 --- /dev/null +++ b/ReactAndroid/src/main/third-party/java/junit/BUCK @@ -0,0 +1,11 @@ +prebuilt_jar( + name = 'junit', + binary_jar = ':download-junit', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'download-junit', + url = 'mvn:junit:junit:jar:4.12', + sha1 = '2973d150c0dc1fefe998f834810d68f278ea58ec', +) diff --git a/ReactAndroid/src/main/third-party/java/mockito/BUCK b/ReactAndroid/src/main/third-party/java/mockito/BUCK new file mode 100644 index 000000000..ef93db4ab --- /dev/null +++ b/ReactAndroid/src/main/third-party/java/mockito/BUCK @@ -0,0 +1,11 @@ +prebuilt_jar( + name = 'mockito', + binary_jar = ':mockito-binary-jar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'mockito-binary-jar', + url = 'mvn:org.mockito:mockito-core:jar:1.10.19', + sha1 = 'e8546f5bef4e061d8dd73895b4e8f40e3fe6effe', +) diff --git a/ReactAndroid/src/main/third-party/java/okhttp/BUCK b/ReactAndroid/src/main/third-party/java/okhttp/BUCK new file mode 100644 index 000000000..f4da3fa0b --- /dev/null +++ b/ReactAndroid/src/main/third-party/java/okhttp/BUCK @@ -0,0 +1,23 @@ +prebuilt_jar( + name = 'okhttp', + binary_jar = ':okhttp-binary-jar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'okhttp-binary-jar', + url = 'mvn:com.squareup.okhttp:okhttp:jar:2.5.0', + sha1 = '4de2b4ed3445c37ec1720a7d214712e845a24636' +) + +prebuilt_jar( + name = 'okhttp-ws', + binary_jar = ':okhttp-ws-binary-jar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'okhttp-ws-binary-jar', + url = 'mvn:com.squareup.okhttp:okhttp-ws:jar:2.5.0', + sha1 = '0e9753b7dcae5deca92e871c5c759067070b07bc', +) diff --git a/ReactAndroid/src/main/third-party/java/okio/BUCK b/ReactAndroid/src/main/third-party/java/okio/BUCK new file mode 100644 index 000000000..61ad012c2 --- /dev/null +++ b/ReactAndroid/src/main/third-party/java/okio/BUCK @@ -0,0 +1,11 @@ +prebuilt_jar( + name = 'okio', + binary_jar = ':okio-binary-jar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'okio-binary-jar', + url = 'mvn:com.squareup.okio:okio:jar:1.6.0', + sha1 = '98476622f10715998eacf9240d6b479f12c66143', +) diff --git a/ReactAndroid/src/main/third-party/java/robolectric3/robolectric/BUCK b/ReactAndroid/src/main/third-party/java/robolectric3/robolectric/BUCK new file mode 100644 index 000000000..7e30d1c02 --- /dev/null +++ b/ReactAndroid/src/main/third-party/java/robolectric3/robolectric/BUCK @@ -0,0 +1,45 @@ +android_library( + name = 'robolectric', + exported_deps = [ + ':robolectric-core', + ':robolectric-resources', + ':robolectric-annotations', + ], + visibility = ['//ReactAndroid/...',], +) + +prebuilt_jar( + name = 'robolectric-core', + binary_jar = ':robolectric-binary-jar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'robolectric-binary-jar', + url = 'mvn:org.robolectric:robolectric:jar:3.0', + sha1 = 'f888cea3bc1a24110e315eb9827ab593610ea62f', +) + +prebuilt_jar( + name = 'robolectric-resources', + binary_jar = ':robolectric-resources-binary-jar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'robolectric-resources-binary-jar', + url = 'mvn:org.robolectric:robolectric-resources:jar:3.0', + sha1 = '1ab609054aab67cd13a434567467f4b4774f2465', +) + +prebuilt_jar( + name = 'robolectric-annotations', + binary_jar = ':robolectric-annotations-binary-jar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'robolectric-annotations-binary-jar', + url = 'mvn:org.robolectric:robolectric-annotations:jar:3.0', + sha1 = '2a6cfc072d7680694c1ff893c5dc8fec33163110', +) diff --git a/ReactAndroid/src/main/third-party/java/stetho/BUCK b/ReactAndroid/src/main/third-party/java/stetho/BUCK new file mode 100644 index 000000000..598e76ba8 --- /dev/null +++ b/ReactAndroid/src/main/third-party/java/stetho/BUCK @@ -0,0 +1,23 @@ +prebuilt_jar( + name = 'stetho', + binary_jar = ':stetho-binary-jar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'stetho-binary-jar', + url = 'mvn:com.facebook.stetho:stetho:jar:1.2.0', + sha1 = '1d6cdb8ce8185b8b23213fad48a83987fb6d2d67', +) + +prebuilt_jar( + name = 'stetho-okhttp', + binary_jar = ':stetho-okhttp-binary-jar', + visibility = ['//ReactAndroid/...',], +) + +remote_file( + name = 'stetho-okhttp-binary-jar', + url = 'mvn:com.facebook.stetho:stetho-okhttp:jar:1.2.0', + sha1 = '6c5c9380e245c4ff5be2b2a49dcbb0200c39798e', +) diff --git a/ReactAndroid/src/test/java/com/facebook/react/bridge/BUCK b/ReactAndroid/src/test/java/com/facebook/react/bridge/BUCK new file mode 100644 index 000000000..22f7d5535 --- /dev/null +++ b/ReactAndroid/src/test/java/com/facebook/react/bridge/BUCK @@ -0,0 +1,19 @@ +include_defs('//ReactAndroid/DEFS') + +STANDARD_TEST_SRCS = [ + '**/*Test.java', +] + +android_library( + name = 'testhelpers', + srcs = glob(['**/*.java'], excludes = STANDARD_TEST_SRCS), + deps = [ + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + react_native_dep('third-party/java/mockito:mockito'), + react_native_dep('third-party/java/robolectric3/robolectric:robolectric'), + ], + visibility = [ + 'PUBLIC' + ], +) diff --git a/ReactAndroid/src/test/java/com/facebook/react/modules/BUCK b/ReactAndroid/src/test/java/com/facebook/react/modules/BUCK new file mode 100644 index 000000000..5e9df2b0b --- /dev/null +++ b/ReactAndroid/src/test/java/com/facebook/react/modules/BUCK @@ -0,0 +1,41 @@ +include_defs('//ReactAndroid/DEFS') + +robolectric3_test( + # Please change the contact to the oncall of your team + contacts = ['oncall+fbandroid_sheriff@xmail.facebook.com'], + name = 'modules', + srcs = glob(['**/*.java']), + deps = [ + react_native_target('java/com/facebook/csslayout:csslayout'), + react_native_target('java/com/facebook/react:react'), + react_native_target('java/com/facebook/react/animation:animation'), + react_native_target('java/com/facebook/react/bridge:bridge'), + react_native_target('java/com/facebook/react/common:common'), + react_native_target('java/com/facebook/react/modules/clipboard:clipboard'), + react_native_target('java/com/facebook/react/modules/common:common'), + react_native_target('java/com/facebook/react/modules/core:core'), + react_native_target('java/com/facebook/react/modules/debug:debug'), + react_native_target('java/com/facebook/react/modules/dialog:dialog'), + react_native_target('java/com/facebook/react/modules/network:network'), + react_native_target('java/com/facebook/react/modules/storage:storage'), + react_native_target('java/com/facebook/react/modules/systeminfo:systeminfo'), + react_native_target('java/com/facebook/react/uimanager:uimanager'), + react_native_target('java/com/facebook/react/touch:touch'), + + react_native_tests_target('java/com/facebook/react/bridge:testhelpers'), + react_native_dep('libraries/fbcore/src/test/java/com/facebook/powermock:powermock'), + react_native_dep('third-party/java/robolectric3/robolectric:robolectric'), + react_native_dep('third-party/java/fest:fest'), + react_native_dep('third-party/java/junit:junit'), + react_native_dep('third-party/java/okio:okio'), + react_native_dep('third-party/java/mockito:mockito'), + react_native_dep('third-party/java/okhttp:okhttp'), + ], + visibility = [ + 'PUBLIC' + ], +) + +project_config( + test_target = ':modules', +) diff --git a/ReactAndroid/src/test/java/org/mockito/configuration/BUCK b/ReactAndroid/src/test/java/org/mockito/configuration/BUCK new file mode 100644 index 000000000..f4d1366df --- /dev/null +++ b/ReactAndroid/src/test/java/org/mockito/configuration/BUCK @@ -0,0 +1,16 @@ +include_defs('//ReactAndroid/DEFS') + +android_library( + name = 'configuration', + srcs = glob(['**/*.java']), + deps = [ + react_native_dep('third-party/java/mockito:mockito'), + ], + visibility = [ + 'PUBLIC', + ], +) + +project_config( + src_target = ':configuration', +)