build.gradle 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. buildscript {
  3. ext {
  4. buildToolsVersion = "31.0.0"
  5. minSdkVersion = 21
  6. compileSdkVersion = 33
  7. targetSdkVersion = 33
  8. if (System.properties['os.arch'] == "aarch64") {
  9. // For M1 Users we need to use the NDK 24 which added support for aarch64
  10. ndkVersion = "24.0.8215888"
  11. } else {
  12. // Otherwise we default to the side-by-side NDK version from AGP.
  13. ndkVersion = "21.4.7075529"
  14. }
  15. }
  16. repositories {
  17. //fcm
  18. maven { url "https://maven.google.com" }
  19. maven { url 'https://maven.aliyun.com/repository/public' }
  20. maven { url 'https://maven.aliyun.com/repository/google' }
  21. maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
  22. google()
  23. mavenCentral()
  24. }
  25. dependencies {
  26. classpath("com.android.tools.build:gradle:7.2.1")
  27. classpath("com.facebook.react:react-native-gradle-plugin")
  28. classpath("de.undercouch:gradle-download-task:5.0.1")
  29. //fcm
  30. classpath 'com.google.gms:google-services:4.3.15'
  31. // NOTE: Do not place your application dependencies here; they belong
  32. // in the individual module build.gradle files
  33. }
  34. }
  35. def REACT_NATIVE_VERSION = new File(['node', '--print', "JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim())
  36. allprojects {
  37. configurations.all {
  38. resolutionStrategy {
  39. force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
  40. }
  41. }
  42. repositories {
  43. maven {
  44. // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
  45. url("$rootDir/../node_modules/react-native/android")
  46. }
  47. maven {
  48. // Android JSC is installed from npm
  49. url("$rootDir/../node_modules/jsc-android/dist")
  50. }
  51. mavenCentral {
  52. // We don't want to fetch react-native from Maven Central as there are
  53. // older versions over there.
  54. content {
  55. excludeGroup "com.facebook.react"
  56. }
  57. }
  58. maven {
  59. // expo-camera bundles a custom com.google.android:cameraview
  60. url "$rootDir/../node_modules/expo-camera/android/maven"
  61. }
  62. //fcm
  63. maven { url "https://maven.google.com" }
  64. maven { url 'https://maven.aliyun.com/repository/public' }
  65. maven { url 'https://maven.aliyun.com/repository/google' }
  66. maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
  67. google()
  68. maven { url 'https://www.jitpack.io' }
  69. }
  70. }