lbry-fdroid/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle
Akinwale Ariwodola d8b0e89c6c
Build update (#495)
* package and build updates
* add sdk preview license to build
* use build tools 26.0.2
* use different libgmp mirror
2019-03-25 07:45:19 +01:00

113 lines
2.5 KiB
Groovy

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
}
}
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
maven {
// All of React Native (JS, Android binaries) is installed from npm
url "$rootDir/react/node_modules/react-native/android"
}
flatDir {
dirs 'libs'
}
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion {{ android_api }}
buildToolsVersion '{{ build_tools_version }}'
defaultConfig {
minSdkVersion {{ args.min_sdk_version }}
targetSdkVersion {{ android_api }}
versionCode {{ args.numeric_version }}
versionName '{{ args.version }}'
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "../" + outputFileName
}
}
dexOptions {
jumboMode true
}
{% 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 {
jniLibs.srcDir 'libs'
}
}
}
ext {
compileSdkVersion = {{ android_api }}
buildToolsVersion = '{{ build_tools_version }}'
minSdkVersion = {{ args.min_sdk_version }}
targetSdkVersion = {{ android_api }}
}
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion {{ android_api }}
buildToolsVersion '{{ build_tools_version }}'
}
}
}
}
dependencies {
compile project(':react-native-exception-handler')
compile project(':react-native-fast-image')
compile project(':rn-fetch-blob')
compile project(':react-native-video')
{%- for aar in aars %}
compile(name: '{{ aar }}', ext: 'aar')
{%- endfor -%}
{%- if args.depends -%}
{%- for depend in args.depends %}
compile '{{ depend }}'
{%- endfor %}
{%- endif %}
}