status-mobile/android/build.gradle

71 lines
2.4 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 {
// kotlin_version is needed for react-native-camera-kit library
kotlin_version = project.kotlinPluginVersion
RNNKotlinVersion = project.kotlinPluginVersion
RNGH_kotlinVersion = project.kotlinPluginVersion
buildToolsVersion = project.buildToolsVersion
minSdkVersion = Integer.valueOf(project.minSdkVersion)
compileSdkVersion = Integer.valueOf(project.compileSdkVersion)
targetSdkVersion = Integer.valueOf(project.targetSdkVersion)
supportLibVersion = project.supportLibVersion
gradlePluginVersion = project.gradlePluginVersion
kotlinVersion = project.kotlinPluginVersion
kotlinPluginVersion = project.kotlinPluginVersion
kotlinToolsVersion = project.kotlinPluginVersion
ndkVersion = "25.2.9519653"
}
buildscript {
repositories {
flatDir { dirs "libs", "${rootDir}/app/libs" }
google()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${project.ext.kotlinPluginVersion}"
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
}
}
subprojects {
afterEvaluate {
if (project.hasProperty("android")) {
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
targetSdkVersion rootProject.ext.targetSdkVersion
}
}
}
}
}
apply plugin: "com.facebook.react.rootproject"
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()
// Android JSC is installed from npm
maven { url("$rootDir/../node_modules/jsc-android/dist") }
// For geth, function, and status-go
flatDir { dirs "libs", System.env.STATUS_GO_ANDROID_LIBDIR }
google()
mavenCentral()
maven { url 'https://mvnrepository.com/artifact/com.github.gundy/semver4j'}
}
}