status-react/android/build.gradle

88 lines
3.4 KiB
Groovy
Raw Permalink Normal View History

2016-02-22 22:04:42 +00:00
// 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"
}
2016-02-22 22:04:42 +00:00
buildscript {
repositories {
flatDir { dirs "libs", "${rootDir}/app/libs" }
google()
mavenCentral()
2016-02-22 22:04:42 +00:00
}
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")
2016-02-22 22:04:42 +00:00
}
}
2019-03-04 12:38:41 +00:00
subprojects {
afterEvaluate {
if (project.hasProperty("android")) {
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
2019-03-04 12:38:41 +00:00
defaultConfig {
targetSdkVersion rootProject.ext.targetSdkVersion
2019-03-04 12:38:41 +00:00
}
// Speed up Tests Stage
tasks.withType(Test).configureEach {
// https://docs.gradle.org/current/userguide/performance.html#execute_tests_in_parallel
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
// https://docs.gradle.org/current/userguide/performance.html#fork_tests_into_multiple_processes
forkEvery = 100
// https://docs.gradle.org/current/userguide/performance.html#disable_reports
reports.html.required = false
reports.junitXml.required = false
}
// Speed up Java Compile Stage
// https://docs.gradle.org/current/userguide/performance.html#run_the_compiler_as_a_separate_process
tasks.withType(JavaCompile).configureEach {
options.fork = true
}
2019-03-04 12:38:41 +00:00
}
}
}
}
apply plugin: "com.facebook.react.rootproject"
2016-02-22 22:04:42 +00:00
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!')
}
}
2016-02-22 22:04:42 +00:00
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'}
2016-02-22 22:04:42 +00:00
}
2018-06-28 10:50:17 +00:00
}