react-native-firebase/bridge/android/app/build.gradle

124 lines
3.9 KiB
Groovy
Raw Normal View History

2018-03-23 13:40:07 +00:00
apply plugin: "com.android.application"
2018-03-23 14:26:11 +00:00
apply plugin: "com.google.firebase.firebase-perf"
apply plugin: 'io.fabric'
2018-03-23 13:40:07 +00:00
import com.android.build.OutputFile
2018-03-23 14:26:11 +00:00
project.ext.react = [
2018-03-23 22:18:19 +00:00
entryFile: "index.js"
2018-03-23 14:26:11 +00:00
]
2018-03-23 13:40:07 +00:00
apply from: "../../node_modules/react-native/react.gradle"
2018-03-23 14:26:11 +00:00
def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = false
2018-03-23 13:40:07 +00:00
android {
2018-03-23 22:18:19 +00:00
compileSdkVersion 27
buildToolsVersion '27.0.2'
2018-03-23 13:40:07 +00:00
2018-03-23 22:18:19 +00:00
defaultConfig {
applicationId "com.testing"
minSdkVersion 18
targetSdkVersion 27
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
2018-03-23 13:40:07 +00:00
}
2018-03-23 22:18:19 +00:00
testBuildType System.getProperty('testBuildType', 'debug')
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
missingDimensionStrategy "minReactNative", "minReactNative46"
multiDexEnabled true
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
2018-03-23 13:40:07 +00:00
}
2018-03-23 22:18:19 +00:00
}
signingConfigs {
release {
storeFile file("keystore.jks")
storePassword "12345678"
keyAlias "key0"
keyPassword "12345678"
2018-03-23 13:40:07 +00:00
}
2018-03-23 22:18:19 +00:00
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
2018-03-23 13:40:07 +00:00
}
2018-03-23 22:18:19 +00:00
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a": 1, "x86": 2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
2018-03-23 13:40:07 +00:00
}
2018-03-23 22:18:19 +00:00
}
2018-03-23 13:40:07 +00:00
2018-03-23 22:18:19 +00:00
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
2018-03-23 13:40:07 +00:00
}
2018-03-23 22:18:19 +00:00
project.ext.firebaseVersion = '12.0.0'
2018-03-23 14:26:11 +00:00
2018-03-23 13:40:07 +00:00
dependencies {
2018-03-23 22:18:19 +00:00
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native:+"
implementation(project(':react-native-firebase')) {
transitive = false
}
2018-03-23 14:26:11 +00:00
implementation project(':bridge')
2018-03-24 02:02:59 +00:00
2018-03-23 22:18:19 +00:00
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.google.android.gms:play-services-base:$firebaseVersion"
2018-03-24 02:02:59 +00:00
compile "com.google.firebase:firebase-ads:$firebaseVersion"
2018-03-23 22:18:19 +00:00
compile "com.google.firebase:firebase-auth:$firebaseVersion"
compile "com.google.firebase:firebase-config:$firebaseVersion"
compile "com.google.firebase:firebase-core:$firebaseVersion"
compile "com.google.firebase:firebase-crash:$firebaseVersion"
compile "com.google.firebase:firebase-database:$firebaseVersion"
compile "com.google.firebase:firebase-messaging:$firebaseVersion"
compile "com.google.firebase:firebase-perf:$firebaseVersion"
compile "com.google.firebase:firebase-storage:$firebaseVersion"
compile "com.google.firebase:firebase-firestore:$firebaseVersion"
compile "com.google.firebase:firebase-invites:$firebaseVersion"
compile('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
transitive = true
}
compile "com.android.support:appcompat-v7:27.1.0"
implementation fileTree(dir: "libs", include: ["*.jar"])
androidTestImplementation(project(path: ":detox"))
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test:rules:1.0.1'
2018-03-23 13:40:07 +00:00
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
2018-03-23 22:18:19 +00:00
from configurations.compile
into 'libs'
2018-03-23 13:40:07 +00:00
}
2018-03-23 14:26:11 +00:00
apply plugin: 'com.google.gms.google-services'