Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

BUCK 1.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. lib_deps = []
  11. for jarfile in glob(['libs/*.jar']):
  12. name = 'jars__' + jarfile[jarfile.rindex('/') + 1: jarfile.rindex('.jar')]
  13. lib_deps.append(':' + name)
  14. prebuilt_jar(
  15. name = name,
  16. binary_jar = jarfile,
  17. )
  18. for aarfile in glob(['libs/*.aar']):
  19. name = 'aars__' + aarfile[aarfile.rindex('/') + 1: aarfile.rindex('.aar')]
  20. lib_deps.append(':' + name)
  21. android_prebuilt_aar(
  22. name = name,
  23. aar = aarfile,
  24. )
  25. android_library(
  26. name = "all-libs",
  27. exported_deps = lib_deps,
  28. )
  29. android_library(
  30. name = "app-code",
  31. srcs = glob([
  32. "src/main/java/**/*.java",
  33. ]),
  34. deps = [
  35. ":all-libs",
  36. ":build_config",
  37. ":res",
  38. ],
  39. )
  40. android_build_config(
  41. name = "build_config",
  42. package = "com.example",
  43. )
  44. android_resource(
  45. name = "res",
  46. package = "com.example",
  47. res = "src/main/res",
  48. )
  49. android_binary(
  50. name = "app",
  51. keystore = "//android/keystores:debug",
  52. manifest = "src/main/AndroidManifest.xml",
  53. package_type = "debug",
  54. deps = [
  55. ":app-code",
  56. ],
  57. )