diff --git a/.buckconfig b/.buckconfig index 9f6c686b2fc18a..8e9e59e246b732 100644 --- a/.buckconfig +++ b/.buckconfig @@ -7,3 +7,4 @@ [alias] movies = //Examples/Movies/android/app:app + uiexplorer = //Examples/UIExplorer/android/app:app diff --git a/Examples/Movies/README.md b/Examples/Movies/README.md index e80a81feead9c6..ed7046c746ada3 100644 --- a/Examples/Movies/README.md +++ b/Examples/Movies/README.md @@ -35,6 +35,21 @@ Open the Movies app in your emulator. See [Running on Device](https://facebook.github.io/react-native/docs/running-on-device-android.html) in case you want to use a physical device. +### Running with Buck + +Follow the same setup as running with gradle. + +Install Buck from [here](https://buckbuild.com/setup/install.html). + +Run the following commands from the react-native folder: + + ./gradlew :ReactAndroid:packageReactNdkLibsForBuck + buck fetch movies + buck install -r movies + ./packager/packager.sh + +_Note: The native libs are still built using gradle. Full build with buck is coming soon(tm)._ + ## Built from source Building the app on both iOS and Android means building the React Native framework from source. This way you're running the latest native and JS code the way you see it in your clone of the github repo. diff --git a/Examples/Movies/android/app/BUCK b/Examples/Movies/android/app/BUCK index 25c73fd5441544..0d774043917082 100644 --- a/Examples/Movies/android/app/BUCK +++ b/Examples/Movies/android/app/BUCK @@ -13,29 +13,17 @@ android_library( name = 'movies-lib', srcs = glob(['src/main/java/**/*.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/devsupport:devsupport'), + ':res', + react_native_dep('third-party/java/jsr-305:jsr-305'), react_native_target('java/com/facebook/react/modules/core:core'), react_native_target('java/com/facebook/react/shell:shell'), - react_native_target('java/com/facebook/react/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/image:image'), - 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/text:text'), - react_native_target('java/com/facebook/react/views/view:view'), + react_native_target('java/com/facebook/react:react'), + react_native_target('jni/prebuilt:android-jsc'), # .so files are prebuilt by Gradle with `./gradlew :ReactAndroid:packageReactNdkLibsForBuck` react_native_target('jni/prebuilt:reactnative-libs'), - react_native_target('jni/prebuilt:android-jsc'), - react_native_dep('libraries/soloader/java/com/facebook/soloader:soloader'), - react_native_dep('third-party/java/jsr-305:jsr-305'), - ':res', ], ) - android_resource( name = 'res', res = 'src/main/res', diff --git a/Examples/Movies/android/app/src/main/AndroidManifest.xml b/Examples/Movies/android/app/src/main/AndroidManifest.xml index 8aaec60819da5b..9c5b43e36c1691 100644 --- a/Examples/Movies/android/app/src/main/AndroidManifest.xml +++ b/Examples/Movies/android/app/src/main/AndroidManifest.xml @@ -1,10 +1,16 @@ + package="com.facebook.react.movies" + android:versionCode="1" + android:versionName="1.0"> + + - + @@ -8,6 +11,10 @@ + +