build.gradle 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. buildscript {
  3. ext {
  4. buildToolsVersion = "30.0.3"
  5. minSdkVersion = 29
  6. compileSdkVersion = 33
  7. targetSdkVersion = 33
  8. kotlinVersion = "1.8.0"
  9. }
  10. repositories {
  11. google()
  12. mavenCentral()
  13. jcenter()
  14. }
  15. dependencies {
  16. classpath("com.android.tools.build:gradle:4.1.0")
  17. classpath 'com.google.gms:google-services:4.3.5'
  18. // NOTE: Do not place your application dependencies here; they belong
  19. // in the individual module build.gradle files
  20. }
  21. }
  22. 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())
  23. allprojects {
  24. configurations.all {
  25. resolutionStrategy {
  26. force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
  27. }
  28. }
  29. repositories {
  30. mavenLocal()
  31. maven {
  32. // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
  33. url(new File(["node", "--print", "require.resolve('react-native/package.json')"].execute(null, rootDir).text.trim(), "../android"))
  34. }
  35. maven {
  36. // Android JSC is installed from npm
  37. url(new File(["node", "--print", "require.resolve('jsc-android/package.json')"].execute(null, rootDir).text.trim(), "../dist"))
  38. }
  39. google()
  40. mavenCentral()
  41. jcenter()
  42. maven { url 'https://www.jitpack.io' }
  43. }
  44. }