No Description

BUCK 1.5KB

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