2017-12-21 08:24:31 +01:00
|
|
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
|
|
|
buildscript {
|
|
|
|
repositories {
|
2018-08-06 12:51:55 +02:00
|
|
|
jcenter()
|
2017-12-21 08:24:31 +01:00
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
classpath 'com.android.tools.build:gradle:2.3.1'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
allprojects {
|
|
|
|
repositories {
|
|
|
|
jcenter()
|
2018-08-06 12:51:55 +02:00
|
|
|
maven {
|
|
|
|
url 'https://maven.google.com'
|
|
|
|
}
|
2017-12-28 19:06:31 +01:00
|
|
|
maven {
|
|
|
|
// All of React Native (JS, Android binaries) is installed from npm
|
|
|
|
url "$rootDir/react/node_modules/react-native/android"
|
|
|
|
}
|
2017-12-21 08:24:31 +01:00
|
|
|
flatDir {
|
|
|
|
dirs 'libs'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'com.android.application'
|
|
|
|
|
|
|
|
android {
|
|
|
|
compileSdkVersion {{ android_api }}
|
|
|
|
buildToolsVersion '{{ build_tools_version }}'
|
2018-08-11 21:48:54 +02:00
|
|
|
defaultConfig {
|
2017-12-21 08:24:31 +01:00
|
|
|
minSdkVersion {{ args.min_sdk_version }}
|
|
|
|
targetSdkVersion {{ android_api }}
|
|
|
|
versionCode {{ args.numeric_version }}
|
|
|
|
versionName '{{ args.version }}'
|
2018-08-06 12:51:55 +02:00
|
|
|
|
|
|
|
ndk {
|
|
|
|
abiFilters "armeabi-v7a", "x86"
|
2017-12-28 19:06:31 +01:00
|
|
|
}
|
2017-12-21 08:24:31 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
{% if args.sign -%}
|
|
|
|
signingConfigs {
|
|
|
|
release {
|
|
|
|
storeFile file(System.getenv("P4A_RELEASE_KEYSTORE"))
|
|
|
|
keyAlias System.getenv("P4A_RELEASE_KEYALIAS")
|
|
|
|
storePassword System.getenv("P4A_RELEASE_KEYSTORE_PASSWD")
|
|
|
|
keyPassword System.getenv("P4A_RELEASE_KEYALIAS_PASSWD")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{%- endif %}
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
debug {
|
|
|
|
}
|
|
|
|
release {
|
|
|
|
{% if args.sign -%}
|
|
|
|
signingConfig signingConfigs.release
|
|
|
|
{%- endif %}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
2018-08-06 12:51:55 +02:00
|
|
|
jniLibs.srcDir 'libs'
|
2017-12-21 08:24:31 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-08-13 11:00:02 +02:00
|
|
|
subprojects {
|
|
|
|
afterEvaluate {project ->
|
|
|
|
if (project.hasProperty("android")) {
|
|
|
|
android {
|
|
|
|
compileSdkVersion {{ android_api }}
|
|
|
|
buildToolsVersion '{{ build_tools_version }}'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-21 08:24:31 +01:00
|
|
|
dependencies {
|
2018-03-18 15:42:16 +01:00
|
|
|
compile project(':react-native-video')
|
2018-08-13 11:00:02 +02:00
|
|
|
compile project(':react-native-fetch-blob')
|
2017-12-21 08:24:31 +01:00
|
|
|
{%- for aar in aars %}
|
|
|
|
compile(name: '{{ aar }}', ext: 'aar')
|
|
|
|
{%- endfor -%}
|
|
|
|
{%- if args.depends -%}
|
|
|
|
{%- for depend in args.depends %}
|
|
|
|
compile '{{ depend }}'
|
|
|
|
{%- endfor %}
|
|
|
|
{%- endif %}
|
|
|
|
}
|