build.gradle 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. // compileSdkVersion = 33
  9. // targetSdkVersion = 26
  10. if (System.properties['os.arch'] == "aarch64") {
  11. // For M1 Users we need to use the NDK 24 which added support for aarch64
  12. ndkVersion = "24.0.8215888"
  13. } else {
  14. // Otherwise we default to the side-by-side NDK version from AGP.
  15. ndkVersion = "21.4.7075529"
  16. }
  17. }
  18. repositories {
  19. //fcm
  20. maven { url "https://maven.google.com" }
  21. maven { url 'https://maven.aliyun.com/repository/public' }
  22. maven { url 'https://maven.aliyun.com/repository/google' }
  23. maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
  24. google()
  25. mavenCentral()
  26. }
  27. dependencies {
  28. classpath('com.android.tools.build:gradle:7.4.2')
  29. classpath("com.facebook.react:react-native-gradle-plugin")
  30. classpath("de.undercouch:gradle-download-task:5.0.1")
  31. //fcm
  32. classpath 'com.google.gms:google-services:4.3.15'
  33. // NOTE: Do not place your application dependencies here; they belong
  34. // in the individual module build.gradle files
  35. }
  36. }
  37. 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())
  38. allprojects {
  39. configurations.all {
  40. resolutionStrategy {
  41. force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
  42. }
  43. }
  44. repositories {
  45. maven {
  46. // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
  47. url("$rootDir/../node_modules/react-native/android")
  48. }
  49. maven {
  50. // Android JSC is installed from npm
  51. url("$rootDir/../node_modules/jsc-android/dist")
  52. }
  53. mavenCentral {
  54. // We don't want to fetch react-native from Maven Central as there are
  55. // older versions over there.
  56. content {
  57. excludeGroup "com.facebook.react"
  58. }
  59. }
  60. maven {
  61. // expo-camera bundles a custom com.google.android:cameraview
  62. url "$rootDir/../node_modules/expo-camera/android/maven"
  63. }
  64. //fcm
  65. maven { url "https://maven.google.com" }
  66. maven { url 'https://maven.aliyun.com/repository/public' }
  67. maven { url 'https://maven.aliyun.com/repository/google' }
  68. maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
  69. google()
  70. maven { url 'https://www.jitpack.io' }
  71. }
  72. }