Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

50 wiersze
1.3 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.3.1'
  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. google()
  18. jcenter()
  19. maven {
  20. // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
  21. url "$rootDir/../node_modules/react-native/android"
  22. }
  23. }
  24. }
  25. ext {
  26. buildToolsVersion = "28.0.3"
  27. minSdkVersion = 16
  28. compileSdkVersion = 28
  29. targetSdkVersion = 28
  30. supportLibVersion = "28.0.0"
  31. def npmVersion = getNpmVersionArray()
  32. versionMajor = npmVersion[0]
  33. versionMinor = npmVersion[1]
  34. versionPatch = npmVersion[2]
  35. }
  36. def getNpmVersion() {
  37. def inputFile = new File("../package.json")
  38. def packageJson = new JsonSlurper().parseText(inputFile.text)
  39. return packageJson["version"]
  40. }
  41. def getNpmVersionArray() {
  42. def (major, minor, patch) = getNpmVersion().tokenize('.')
  43. return [Integer.parseInt(major), Integer.parseInt(minor), Integer.parseInt(patch)] as int[]
  44. }