build.gradle 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import org.apache.tools.ant.taskdefs.condition.Os
  2. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  3. buildscript {
  4. ext {
  5. buildToolsVersion = "31.0.0"
  6. minSdkVersion = 21
  7. compileSdkVersion = 31
  8. targetSdkVersion = 31
  9. agp_version = '7.1.1'
  10. agp_version1 = agp_version
  11. if (System.properties['os.arch'] == "aarch64") {
  12. // For M1 Users we need to use the NDK 24 which added support for aarch64
  13. ndkVersion = "24.0.8215888"
  14. } else {
  15. // Otherwise we default to the side-by-side NDK version from AGP.
  16. ndkVersion = "21.4.7075529"
  17. }
  18. }
  19. repositories {
  20. google()
  21. // maven { url 'https://maven.aliyun.com/repository/google' }
  22. mavenCentral()
  23. }
  24. dependencies {
  25. classpath('com.android.tools.build:gradle:7.2.1')
  26. classpath("com.facebook.react:react-native-gradle-plugin")
  27. classpath("de.undercouch:gradle-download-task:5.0.1")
  28. // NOTE: Do not place your application dependencies here; they belong
  29. // in the individual module build.gradle files
  30. }
  31. }
  32. allprojects {
  33. repositories {
  34. google()
  35. maven { url 'https://maven.aliyun.com/repository/jcenter' }
  36. maven { url 'https://maven.aliyun.com/repository/google' }
  37. maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
  38. maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter' }
  39. maven {
  40. // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
  41. url("$rootDir/../node_modules/react-native/android")
  42. }
  43. maven {
  44. // Android JSC is installed from npm
  45. url("$rootDir/../node_modules/jsc-android/dist")
  46. }
  47. mavenCentral {
  48. // We don't want to fetch react-native from Maven Central as there are
  49. // older versions over there.
  50. content {
  51. excludeGroup "com.facebook.react"
  52. }
  53. }
  54. // maven { url 'https://maven.aliyun.com/repository/google' }
  55. maven { url 'https://www.jitpack.io' }
  56. }
  57. }