-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ability to run Movies app with BUCK
Reviewed By: mkonicek Differential Revision: D2874873 fb-gh-sync-id: 9feface8d9a18742e68206dbafb804de25f53ed8 shipit-source-id: 9feface8d9a18742e68206dbafb804de25f53ed8
- Loading branch information
Showing
20 changed files
with
158 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,6 @@ | |
|
||
[maven_repositories] | ||
central = https://repo1.maven.org/maven2 | ||
|
||
[alias] | ||
movies = //Examples/Movies/android/app:app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
include_defs('//ReactAndroid/DEFS') | ||
|
||
android_binary( | ||
name = 'app', | ||
manifest = 'src/main/AndroidManifest.xml', | ||
keystore = '//keystores:debug', | ||
deps = [ | ||
':movies-lib', | ||
], | ||
) | ||
|
||
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'), | ||
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'), | ||
# .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', | ||
package = 'com.facebook.react.movies', | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 8 additions & 28 deletions
36
ReactAndroid/src/main/android_res/android/support/v7/appcompat-orig/BUCK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,10 @@ | ||
# 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', | ||
) | ||
include_defs('//ReactAndroid/DEFS') | ||
|
||
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', | ||
# used by ReactToolbarManager because of Gradle | ||
# TODO t10182713 will be replaced with res-for-appcompat when we stop using Gradle | ||
android_resource( | ||
name = 'res-for-react-native', | ||
res = react_native_dep('third-party/android/support/v7/appcompat-orig:res-unpacker-cmd'), | ||
package = 'com.facebook.react', | ||
visibility = ['//ReactAndroid/...',], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
ReactAndroid/src/main/java/com/facebook/react/views/toolbar/DrawableWithIntrinsicSize.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
ReactAndroid/src/main/java/com/facebook/react/views/toolbar/ReactToolbar.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 7 additions & 8 deletions
15
ReactAndroid/src/main/libraries/fbcore/src/main/java/com/facebook/common/logging/BUCK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,10 @@ | ||
android_prebuilt_aar( | ||
include_defs('//ReactAndroid/DEFS') | ||
|
||
android_library( | ||
name = 'logging', | ||
aar = ':fbcore-binary-aar', | ||
visibility = ['//ReactAndroid/...'], | ||
exported_deps = [ | ||
react_native_dep('libraries/fresco/fresco-react-native:fbcore'), | ||
], | ||
visibility = ['//ReactAndroid/...',], | ||
) | ||
|
||
remote_file( | ||
name = 'fbcore-binary-aar', | ||
url = 'mvn:com.facebook.fresco:fbcore:aar:0.8.1', | ||
sha1 = 'cc46b3d564139bf63bb41534c7a723ee8119ae5f', | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 53 additions & 3 deletions
56
ReactAndroid/src/main/third-party/android/support/v7/appcompat-orig/BUCK
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
keystore( | ||
name = 'debug', | ||
store = 'debug.keystore', | ||
properties = 'debug.keystore.properties', | ||
visibility = [ | ||
'PUBLIC', | ||
], | ||
) |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
key.store=debug.keystore | ||
key.alias=androiddebugkey | ||
key.store.password=android | ||
key.alias.password=android |