Files: e7a281942d7ba07122d3b8d738ef13d3b128ea0e / android / app / BUCK
1586 bytesRaw
1 | # To learn about Buck see [Docs](https://buckbuild.com/). |
2 | # To run your application with Buck: |
3 | # - install Buck |
4 | # - `npm start` - to start the packager |
5 | # - `cd android` |
6 | # - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` |
7 | # - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck |
8 | # - `buck install -r android/app` - compile, install and run application |
9 | # |
10 | |
11 | lib_deps = [] |
12 | |
13 | for jarfile in glob(['libs/*.jar']): |
14 | name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')] |
15 | lib_deps.append(':' + name) |
16 | prebuilt_jar( |
17 | name = name, |
18 | binary_jar = jarfile, |
19 | ) |
20 | |
21 | for aarfile in glob(['libs/*.aar']): |
22 | name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')] |
23 | lib_deps.append(':' + name) |
24 | android_prebuilt_aar( |
25 | name = name, |
26 | aar = aarfile, |
27 | ) |
28 | |
29 | android_library( |
30 | name = "all-libs", |
31 | exported_deps = lib_deps, |
32 | ) |
33 | |
34 | android_library( |
35 | name = "app-code", |
36 | srcs = glob([ |
37 | "src/main/java/**/*.java", |
38 | ]), |
39 | deps = [ |
40 | ":all-libs", |
41 | ":build_config", |
42 | ":res", |
43 | ], |
44 | ) |
45 | |
46 | android_build_config( |
47 | name = "build_config", |
48 | package = "com.datreactnative", |
49 | ) |
50 | |
51 | android_resource( |
52 | name = "res", |
53 | package = "com.datreactnative", |
54 | res = "src/main/res", |
55 | ) |
56 | |
57 | android_binary( |
58 | name = "app", |
59 | keystore = "//android/keystores:debug", |
60 | manifest = "src/main/AndroidManifest.xml", |
61 | package_type = "debug", |
62 | deps = [ |
63 | ":app-code", |
64 | ], |
65 | ) |
66 |
Built with git-ssb-web