2018-07-20 15:57:12 +03:00
|
|
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
2019-09-13 09:58:29 +03:00
|
|
|
import groovy.json.JsonSlurper
|
|
|
|
|
|
|
|
def getNpmVersion() {
|
|
|
|
def inputFile = new File(projectDir.getPath() + "/../package.json")
|
|
|
|
def packageJson = new JsonSlurper().parseText(inputFile.text)
|
|
|
|
return packageJson["version"]
|
|
|
|
}
|
|
|
|
|
|
|
|
def getNpmVersionArray() { // major [0], minor [1], patch [2]
|
|
|
|
def (major, minor, patch) = getNpmVersion().tokenize('.')
|
|
|
|
return [Integer.parseInt(major), Integer.parseInt(minor), Integer.parseInt(patch)] as int[]
|
|
|
|
}
|
2018-07-20 15:57:12 +03:00
|
|
|
|
|
|
|
buildscript {
|
2018-10-04 05:18:36 +03:00
|
|
|
ext {
|
2021-09-16 15:54:37 +03:00
|
|
|
buildToolsVersion = "30.0.2"
|
2021-04-01 13:34:59 +03:00
|
|
|
minSdkVersion = 21
|
2021-09-16 10:55:13 +03:00
|
|
|
compileSdkVersion = 30
|
|
|
|
targetSdkVersion = 30
|
2019-10-04 18:56:22 +03:00
|
|
|
googlePlayServicesVisionVersion = "17.0.2"
|
|
|
|
googlePlayServicesVersion = "16.+"
|
|
|
|
firebaseVersion = "17.3.4"
|
2018-10-04 05:18:36 +03:00
|
|
|
}
|
2018-07-20 15:57:12 +03:00
|
|
|
repositories {
|
2018-10-04 05:18:36 +03:00
|
|
|
google()
|
2021-09-16 16:13:25 +03:00
|
|
|
mavenCentral()
|
2018-07-20 15:57:12 +03:00
|
|
|
}
|
|
|
|
dependencies {
|
2021-07-31 10:03:17 +03:00
|
|
|
classpath('com.android.tools.build:gradle:4.1.0')
|
2020-06-07 18:12:04 +03:00
|
|
|
classpath 'com.google.gms:google-services:4.3.3'
|
2021-07-31 01:00:03 +03:00
|
|
|
classpath 'com.bugsnag:bugsnag-android-gradle-plugin:5.+'
|
2018-07-20 15:57:12 +03:00
|
|
|
// NOTE: Do not place your application dependencies here; they belong
|
|
|
|
// in the individual module build.gradle files
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
repositories {
|
2021-09-16 16:13:25 +03:00
|
|
|
google()
|
2021-08-18 17:41:19 +03:00
|
|
|
mavenCentral()
|
2018-07-20 15:57:12 +03:00
|
|
|
mavenLocal()
|
|
|
|
maven {
|
|
|
|
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
2019-09-11 22:42:49 +03:00
|
|
|
url("$rootDir/../node_modules/react-native/android")
|
2018-07-20 15:57:12 +03:00
|
|
|
}
|
2020-01-23 13:06:43 +03:00
|
|
|
maven {
|
2019-09-11 22:42:49 +03:00
|
|
|
// Android JSC is installed from npm
|
2020-01-23 13:06:43 +03:00
|
|
|
url("$rootDir/../node_modules/jsc-android/dist")
|
|
|
|
}
|
2018-07-20 15:57:12 +03:00
|
|
|
|
2021-07-29 13:40:20 +03:00
|
|
|
maven { url "https://www.jitpack.io" }
|
2021-08-18 17:41:19 +03:00
|
|
|
|
|
|
|
|
|
|
|
//TODO: remove when replacement for selective groups is available
|
|
|
|
//the jcenter will be accessible as read-only indefinitely so we should be
|
|
|
|
//good for now with these selective packages as they are not available off of
|
|
|
|
//jCenter
|
|
|
|
jcenter() {
|
|
|
|
content {
|
|
|
|
// these groups only available in jcenter otherwise we don't want to rely on jcenter.
|
|
|
|
includeGroup("com.facebook.yoga")
|
|
|
|
includeGroup("com.facebook.fbjni")
|
|
|
|
includeGroup("com.henninghall.android")
|
|
|
|
includeGroup("org.matomo.sdk")
|
|
|
|
}
|
|
|
|
}
|
2018-12-17 15:34:00 +03:00
|
|
|
}
|
2018-12-10 12:12:04 +03:00
|
|
|
}
|
2019-09-13 09:58:29 +03:00
|
|
|
|
|
|
|
subprojects {project ->
|
|
|
|
ext {
|
|
|
|
def npmVersion = getNpmVersionArray()
|
|
|
|
versionMajor = npmVersion[0]
|
|
|
|
versionMinor = npmVersion[1]
|
|
|
|
versionPatch = npmVersion[2]
|
|
|
|
}
|
|
|
|
}
|