status-react/android/build.gradle

74 lines
2.3 KiB
Groovy

// Top-level build file where you can add configuration options common to all sub-projects/modules.
/**
* Project-wide gradle configuration properties for use by all modules
*/
ext {
buildToolsVersion = project.buildToolsVersion
minSdkVersion = Integer.valueOf(project.minSdkVersion)
compileSdkVersion = Integer.valueOf(project.compileSdkVersion)
targetSdkVersion = Integer.valueOf(project.targetSdkVersion)
supportLibVersion = project.supportLibVersion
gradlePluginVersion = project.gradlePluginVersion
googlePlayServicesVersion = project.googlePlayServicesVersion
googlePlayServicesVisionVersion = project.googlePlayServicesVisionVersion
}
buildscript {
repositories {
flatDir { dirs "libs", "${rootDir}/app/libs" }
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:${project.ext.gradlePluginVersion}"
classpath 'com.google.gms:google-services:4.2.0'
classpath 'de.undercouch:gradle-download-task:3.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
subprojects {
afterEvaluate {
if (project.hasProperty("android")) {
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
targetSdkVersion rootProject.ext.targetSdkVersion
}
}
}
}
}
allprojects {
beforeEvaluate {
if (System.env.STATUS_GO_ANDROID_LIBDIR == null || System.env.STATUS_GO_ANDROID_LIBDIR == "") {
throw new GradleException('STATUS_GO_ANDROID_LIBDIR environment variable is not valid!')
}
}
repositories {
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")
}
google()
jcenter()
// for geth, function, and status-go
flatDir { dirs "libs", System.env.STATUS_GO_ANDROID_LIBDIR }
maven { url "https://jitpack.io" }
}
}