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

161 lines
4.9 KiB
Groovy
Raw Normal View History

2018-08-25 12:38:05 +00:00
apply plugin: "com.android.application"
apply plugin: "com.google.firebase.firebase-perf"
apply plugin: 'io.fabric'
import com.android.build.OutputFile
project.ext.react = [
entryFile: "index.js"
]
apply from: "../../node_modules/react-native/react.gradle"
def enableSeparateBuildPerCPUArchitecture = false
def enableProguardInReleaseBuilds = false
android {
compileSdkVersion 27
// buildToolsVersion '27.0.2'
defaultConfig {
applicationId "com.testing"
minSdkVersion 18
targetSdkVersion 27
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
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"
}
}
signingConfigs {
release {
storeFile file("keystore.jks")
storePassword "12345678"
keyAlias "key0"
keyPassword "12345678"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
}
}
// 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
}
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
dependencies {
implementation "com.facebook.react:react-native:+"
implementation fileTree(dir: "libs", include: ["*.jar"])
/* ----------------------------
* REACT NATIVE FIREBASE
* ---------------------------- */
// Library as defined in settings.gradle
implementation project(':react-native-firebase')
// Required dependencies
//noinspection GradleCompatible
implementation "com.google.firebase:firebase-core:16.0.3"
implementation "com.google.android.gms:play-services-base:15.0.1"
/* -------------------------
* OPTIONAL FIREBASE SDKS
* ------------------------- */
// Ads
implementation('com.google.firebase:firebase-ads:15.0.1') {
// exclude `customtabs` as the support lib version is out of date
// we manually add it as a dependency below with a custom version
exclude group: 'com.android.support', module: 'customtabs'
}
// Authentication
implementation "com.google.firebase:firebase-auth:16.0.3"
// Performance Monitoring
implementation "com.google.firebase:firebase-perf:16.1.0"
// Remote Config
implementation "com.google.firebase:firebase-config:16.0.0"
// Cloud Storage
implementation "com.google.firebase:firebase-storage:16.0.1"
// Invites
implementation "com.google.firebase:firebase-invites:16.0.3"
// Real-time Database
implementation "com.google.firebase:firebase-database:16.0.1"
// Cloud Functions
implementation "com.google.firebase:firebase-functions:16.1.0"
// Cloud Firestore
implementation "com.google.firebase:firebase-firestore:17.1.0"
// Cloud Messaging / FCM
implementation "com.google.firebase:firebase-messaging:17.3.0"
// Crashlytics
implementation('com.crashlytics.sdk.android:crashlytics:2.9.3@aar') {
transitive = true
}
/* --------------------------------
* OPTIONAL ANDROID SUPPORT LIBS
* -------------------------------- */
// For Firebase Ads
implementation "com.android.support:customtabs:27.1.1"
// For React Native Firebase Notifications
implementation "com.android.support:appcompat-v7:27.1.1"
implementation 'com.android.support:support-annotations:27.1.1'
/* ------------------------
* TESTING SDKS/LIBRARIES
* ------------------------ */
implementation(project(':jet')) {
transitive = false
}
androidTestImplementation(project(path: ":detox"))
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
}
// 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) {
from configurations.compile
into 'libs'
}
apply plugin: 'com.google.gms.google-services'