選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 
 

58 行
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. mavenCentral()
  7. }
  8. dependencies {
  9. classpath("com.android.tools.build:gradle:4.2.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. mavenCentral()
  17. mavenLocal()
  18. maven {
  19. // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
  20. url("$rootDir/../node_modules/react-native/android")
  21. }
  22. maven {
  23. // Android JSC is installed from npm
  24. url("$rootDir/../node_modules/jsc-android/dist")
  25. }
  26. google()
  27. jcenter()
  28. maven { url 'https://www.jitpack.io' }
  29. }
  30. }
  31. ext {
  32. buildToolsVersion = "30.0.2"
  33. minSdkVersion = 21
  34. compileSdkVersion = 30
  35. targetSdkVersion = 30
  36. ndkVersion = "21.4.7075529"
  37. def npmVersion = getNpmVersionArray()
  38. versionMajor = npmVersion[0]
  39. versionMinor = npmVersion[1]
  40. versionPatch = npmVersion[2]
  41. }
  42. def getNpmVersion() {
  43. def inputFile = new File("../package.json")
  44. def packageJson = new JsonSlurper().parseText(inputFile.text)
  45. return packageJson["version"]
  46. }
  47. def getNpmVersionArray() {
  48. def (major, minor, patch) = getNpmVersion().tokenize('.')
  49. return [Integer.parseInt(major), Integer.parseInt(minor), Integer.parseInt(patch)] as int[]
  50. }