build.gradle 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. if (System.properties['os.arch'] == "aarch64") {
  10. // For M1 Users we need to use the NDK 24 which added support for aarch64
  11. ndkVersion = "24.0.8215888"
  12. } else {
  13. // Otherwise we default to the side-by-side NDK version from AGP.
  14. ndkVersion = "21.4.7075529"
  15. }
  16. }
  17. repositories {
  18. google()
  19. mavenCentral()
  20. }
  21. dependencies {
  22. classpath("com.android.tools.build:gradle:7.1.1")
  23. classpath("com.facebook.react:react-native-gradle-plugin")
  24. classpath("de.undercouch:gradle-download-task:5.0.1")
  25. // NOTE: Do not place your application dependencies here; they belong
  26. // in the individual module build.gradle files
  27. }
  28. }
  29. allprojects {
  30. repositories {
  31. maven {
  32. // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
  33. url("$rootDir/../node_modules/react-native/android")
  34. }
  35. maven {
  36. // Android JSC is installed from npm
  37. url("$rootDir/../node_modules/jsc-android/dist")
  38. }
  39. mavenCentral {
  40. // We don't want to fetch react-native from Maven Central as there are
  41. // older versions over there.
  42. content {
  43. excludeGroup "com.facebook.react"
  44. }
  45. }
  46. google()
  47. maven { url 'https://www.jitpack.io' }
  48. }
  49. }