Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

55 строки
1.5 KiB

  1. // Top-level build file where you can add configuration options common to all sub-projects/modules.
  2. import groovy.json.JsonSlurper
  3. buildscript {
  4. repositories {
  5. google()
  6. jcenter()
  7. }
  8. dependencies {
  9. classpath("com.android.tools.build:gradle:3.4.2")
  10. // NOTE: Do not place your application dependencies here; they belong
  11. // in the individual module build.gradle files
  12. }
  13. }
  14. allprojects {
  15. repositories {
  16. mavenLocal()
  17. maven {
  18. // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
  19. url("$rootDir/../node_modules/react-native/android")
  20. }
  21. maven {
  22. // Android JSC is installed from npm
  23. url("$rootDir/../node_modules/jsc-android/dist")
  24. }
  25. google()
  26. jcenter()
  27. maven { url 'https://jitpack.io' }
  28. }
  29. }
  30. ext {
  31. buildToolsVersion = "28.0.3"
  32. minSdkVersion = 21
  33. compileSdkVersion = 28
  34. targetSdkVersion = 28
  35. def npmVersion = getNpmVersionArray()
  36. versionMajor = npmVersion[0]
  37. versionMinor = npmVersion[1]
  38. versionPatch = npmVersion[2]
  39. }
  40. def getNpmVersion() {
  41. def inputFile = new File("../package.json")
  42. def packageJson = new JsonSlurper().parseText(inputFile.text)
  43. return packageJson["version"]
  44. }
  45. def getNpmVersionArray() {
  46. def (major, minor, patch) = getNpmVersion().tokenize('.')
  47. return [Integer.parseInt(major), Integer.parseInt(minor), Integer.parseInt(patch)] as int[]
  48. }