lbry-android/p4a/pythonforandroid/bootstraps/lbry/build/templates/build.tmpl.gradle

150 lines
3.9 KiB
Groovy
Raw Normal View History

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 {
jcenter()
google()
maven { url "https://jitpack.io" }
2017-12-21 08:24:31 +01:00
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.2.0'
2017-12-21 08:24:31 +01:00
}
}
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"
}
maven {
// Android JSC is installed from npm
url("$rootDir/react/node_modules/jsc-android/dist")
}
flatDir {
dirs 'libs'
}
2017-12-21 08:24:31 +01:00
}
}
apply plugin: 'com.android.application'
project.ext.react = [
enableHermes: true,
entryFile: "index.js"
]
def enableHermes = project.ext.react.get("enableHermes", false);
def jscFlavor = 'org.webkit:android-jsc:+'
2017-12-21 08:24:31 +01:00
android {
compileSdkVersion {{ android_api }}
buildToolsVersion '{{ build_tools_version }}'
defaultConfig {
minSdkVersion {{ args.min_sdk_version }}
targetSdkVersion {{ android_api }}
versionCode {{ args.numeric_version }} * 10 + 2
versionName '{{ args.version }}'
missingDimensionStrategy 'react-native-camera', 'general'
multiDexEnabled true
ndk {
2019-08-12 16:11:53 +02:00
abiFilters "arm64-v8a"
}
}
2017-12-21 08:24:31 +01:00
2019-04-29 22:07:58 +02:00
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
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")
}
}
2017-12-21 08:24:31 +01:00
{%- endif %}
buildTypes {
debug {
}
release {
{% if args.sign -%}
signingConfig signingConfigs.release
{%- endif %}
}
}
2017-12-21 08:24:31 +01:00
sourceSets {
main {
jniLibs.srcDir 'libs'
2017-12-21 08:24:31 +01:00
}
}
}
ext {
compileSdkVersion = {{ android_api }}
buildToolsVersion = '{{ build_tools_version }}'
minSdkVersion = {{ args.min_sdk_version }}
targetSdkVersion = {{ android_api }}
supportLibVersion = '28.0.0'
googlePlayServicesVersion = '16.1.0'
googlePlayServicesVisionVersion = '17.0.2'
}
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion {{ android_api }}
buildToolsVersion '{{ build_tools_version }}'
}
}
}
}
2017-12-21 08:24:31 +01:00
dependencies {
compile project(':@react-native-community_async-storage')
compile project(':react-native-camera')
compile project(':react-native-exception-handler')
compile project(':react-native-fast-image')
compile project(':react-native-fs')
compile project(':react-native-gesture-handler')
compile project(':react-native-reanimated')
2019-12-18 11:48:29 +01:00
compile project(':react-native-snackbar')
compile project(':react-native-video')
compile project(':rn-fetch-blob')
{%- for aar in aars %}
compile(name: '{{ aar }}', ext: 'aar')
{%- endfor -%}
{%- if args.depends -%}
{%- for depend in args.depends %}
compile '{{ depend }}'
{%- endfor %}
{%- endif %}
if (enableHermes) {
def hermesPath = "$rootDir/react/node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}
2017-12-21 08:24:31 +01:00
}
apply plugin: 'com.google.gms.google-services'
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true