2017-04-23 19:22:19 +00:00
|
|
|
# To learn about Buck see [Docs](https://buckbuild.com/).
|
|
|
|
# To run your application with Buck:
|
|
|
|
# - install Buck
|
|
|
|
# - `npm start` - to start the packager
|
|
|
|
# - `cd android`
|
|
|
|
# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"`
|
|
|
|
# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck
|
|
|
|
# - `buck install -r android/app` - compile, install and run application
|
|
|
|
#
|
|
|
|
|
|
|
|
lib_deps = []
|
2018-01-16 17:08:44 +00:00
|
|
|
|
2017-04-23 19:22:19 +00:00
|
|
|
for jarfile in glob(['libs/*.jar']):
|
2018-01-16 17:08:44 +00:00
|
|
|
name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
|
2017-04-23 19:22:19 +00:00
|
|
|
lib_deps.append(':' + name)
|
|
|
|
prebuilt_jar(
|
|
|
|
name = name,
|
|
|
|
binary_jar = jarfile,
|
|
|
|
)
|
|
|
|
|
|
|
|
for aarfile in glob(['libs/*.aar']):
|
2018-01-16 17:08:44 +00:00
|
|
|
name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
|
2017-04-23 19:22:19 +00:00
|
|
|
lib_deps.append(':' + name)
|
|
|
|
android_prebuilt_aar(
|
|
|
|
name = name,
|
|
|
|
aar = aarfile,
|
|
|
|
)
|
|
|
|
|
|
|
|
android_library(
|
2018-01-16 17:08:44 +00:00
|
|
|
name = "all-libs",
|
|
|
|
exported_deps = lib_deps,
|
2017-04-23 19:22:19 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
android_library(
|
2018-01-16 17:08:44 +00:00
|
|
|
name = "app-code",
|
|
|
|
srcs = glob([
|
|
|
|
"src/main/java/**/*.java",
|
|
|
|
]),
|
|
|
|
deps = [
|
|
|
|
":all-libs",
|
|
|
|
":build_config",
|
|
|
|
":res",
|
|
|
|
],
|
2017-04-23 19:22:19 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
android_build_config(
|
2018-01-16 17:08:44 +00:00
|
|
|
name = "build_config",
|
|
|
|
package = "com.react-native-firebase-tests",
|
2017-04-23 19:22:19 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
android_resource(
|
2018-01-16 17:08:44 +00:00
|
|
|
name = "res",
|
|
|
|
package = "com.react-native-firebase-tests",
|
|
|
|
res = "src/main/res",
|
2017-04-23 19:22:19 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
android_binary(
|
2018-01-16 17:08:44 +00:00
|
|
|
name = "app",
|
|
|
|
keystore = "//android/keystores:debug",
|
|
|
|
manifest = "src/main/AndroidManifest.xml",
|
|
|
|
package_type = "debug",
|
|
|
|
deps = [
|
|
|
|
":app-code",
|
|
|
|
],
|
2017-04-23 19:22:19 +00:00
|
|
|
)
|