mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-11 06:51:23 +03:00
80 lines
2.6 KiB
Groovy
80 lines
2.6 KiB
Groovy
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
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[]
|
|
}
|
|
|
|
buildscript {
|
|
ext {
|
|
buildToolsVersion = "30.0.2"
|
|
minSdkVersion = 21
|
|
compileSdkVersion = 30
|
|
targetSdkVersion = 30
|
|
googlePlayServicesVisionVersion = "17.0.2"
|
|
googlePlayServicesVersion = "16.+"
|
|
firebaseVersion = "17.3.4"
|
|
}
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
}
|
|
dependencies {
|
|
classpath('com.android.tools.build:gradle:4.1.0')
|
|
classpath 'com.google.gms:google-services:4.3.10'
|
|
classpath 'com.bugsnag:bugsnag-android-gradle-plugin:5.+'
|
|
// NOTE: Do not place your application dependencies here; they belong
|
|
// in the individual module build.gradle files
|
|
}
|
|
}
|
|
|
|
allprojects {
|
|
repositories {
|
|
google()
|
|
mavenCentral()
|
|
mavenLocal()
|
|
maven {
|
|
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
|
url("$rootDir/../node_modules/react-native/android")
|
|
}
|
|
maven {
|
|
// Android JSC is installed from npm
|
|
url("$rootDir/../node_modules/jsc-android/dist")
|
|
}
|
|
|
|
maven { url "https://www.jitpack.io" }
|
|
|
|
|
|
//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")
|
|
includeModule("com.yqritc", "android-scalablevideoview")
|
|
includeModule("com.wei.android.lib", "fingerprintidentify")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
subprojects {project ->
|
|
ext {
|
|
def npmVersion = getNpmVersionArray()
|
|
versionMajor = npmVersion[0]
|
|
versionMinor = npmVersion[1]
|
|
versionPatch = npmVersion[2]
|
|
}
|
|
}
|