2017-03-02 11:30:08 +00:00
|
|
|
buildscript {
|
2018-03-23 17:03:53 +00:00
|
|
|
ext.firebaseVersion = '12.0.0'
|
2017-08-18 20:03:44 +00:00
|
|
|
repositories {
|
|
|
|
jcenter()
|
2017-12-06 17:25:17 +00:00
|
|
|
maven {
|
|
|
|
url 'https://maven.fabric.io/public'
|
|
|
|
}
|
2017-08-18 20:03:44 +00:00
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
classpath 'com.android.tools.build:gradle:2.3.3'
|
2017-12-06 17:25:17 +00:00
|
|
|
classpath 'io.fabric.tools:gradle:1.24.4'
|
2017-08-18 20:03:44 +00:00
|
|
|
}
|
2017-03-02 11:30:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'com.android.library'
|
|
|
|
|
|
|
|
android {
|
2018-02-15 14:59:21 +00:00
|
|
|
compileSdkVersion 27
|
|
|
|
buildToolsVersion "27.0.2"
|
2017-06-12 13:43:04 +00:00
|
|
|
defaultConfig {
|
|
|
|
minSdkVersion 16
|
|
|
|
targetSdkVersion 26
|
|
|
|
versionCode 1
|
|
|
|
versionName "1.0"
|
2017-08-18 20:03:44 +00:00
|
|
|
// multiDexEnabled true
|
2017-06-12 13:43:04 +00:00
|
|
|
}
|
|
|
|
buildTypes {
|
|
|
|
release {
|
|
|
|
minifyEnabled false
|
2017-03-02 11:30:08 +00:00
|
|
|
}
|
2017-06-12 13:43:04 +00:00
|
|
|
}
|
|
|
|
productFlavors {
|
|
|
|
}
|
2017-03-02 11:30:08 +00:00
|
|
|
}
|
|
|
|
|
2017-08-18 20:03:44 +00:00
|
|
|
|
2017-03-02 11:30:08 +00:00
|
|
|
allprojects {
|
2017-08-18 20:03:44 +00:00
|
|
|
repositories {
|
|
|
|
jcenter()
|
2017-09-27 11:57:53 +00:00
|
|
|
mavenLocal()
|
|
|
|
maven {
|
|
|
|
url "https://maven.google.com"
|
|
|
|
}
|
2017-08-18 20:03:44 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
rootProject.gradle.buildFinished { buildResult ->
|
|
|
|
if (buildResult.getFailure() != null) {
|
|
|
|
try {
|
|
|
|
String message = buildResult.getFailure().properties.get("reportableCauses").toString()
|
|
|
|
if (message.contains("com.android.dex.DexException: Multiple dex files define Lcom/google/") ||
|
|
|
|
message.contains("java.util.zip.ZipException: duplicate entry: com/google/android/gms/")) {
|
|
|
|
logger.log(LogLevel.ERROR, "")
|
|
|
|
logger.log(LogLevel.ERROR, " -----------------------------------------------------------")
|
|
|
|
logger.log(LogLevel.ERROR, "| REACT NATIVE FIREBASE |")
|
|
|
|
logger.log(LogLevel.ERROR, " ----------------------------------------------------------- ")
|
|
|
|
logger.log(LogLevel.ERROR, "| |")
|
|
|
|
logger.log(LogLevel.ERROR, "| This is a common build error when using libraries that |")
|
|
|
|
logger.log(LogLevel.ERROR, "| require google play services. |")
|
|
|
|
logger.log(LogLevel.ERROR, "| |")
|
|
|
|
logger.log(LogLevel.ERROR, "| This error occurs because different versions of google |")
|
|
|
|
logger.log(LogLevel.ERROR, "| play services or google play services modules are being |")
|
|
|
|
logger.log(LogLevel.ERROR, "| required by different libraries. |")
|
|
|
|
logger.log(LogLevel.ERROR, "| |")
|
|
|
|
logger.log(LogLevel.ERROR, "| A temporary fix would be to set: |")
|
|
|
|
logger.log(LogLevel.ERROR, "| |")
|
|
|
|
logger.log(LogLevel.ERROR, "| android { multiDexEnabled true } |")
|
|
|
|
logger.log(LogLevel.ERROR, "| |")
|
|
|
|
logger.log(LogLevel.ERROR, "| inside your build gradle, however it is recommended for |")
|
|
|
|
logger.log(LogLevel.ERROR, "| your prod build that you de-duplicate these to minimize |")
|
|
|
|
logger.log(LogLevel.ERROR, "| bundle size. |")
|
|
|
|
logger.log(LogLevel.ERROR, "| |")
|
|
|
|
logger.log(LogLevel.ERROR, "| See http://invertase.link/dupe-dex for how to do this. |")
|
|
|
|
logger.log(LogLevel.ERROR, "| |")
|
|
|
|
logger.log(LogLevel.ERROR, " ----------------------------------------------------------- ")
|
|
|
|
}
|
|
|
|
} catch (Exception exception) {}
|
|
|
|
}
|
2017-03-02 11:30:08 +00:00
|
|
|
}
|
2017-08-18 20:03:44 +00:00
|
|
|
|
2017-03-02 11:30:08 +00:00
|
|
|
|
|
|
|
dependencies {
|
2017-06-12 13:43:04 +00:00
|
|
|
compile fileTree(include: ['*.jar'], dir: 'libs')
|
2017-08-18 20:03:44 +00:00
|
|
|
compile "com.facebook.react:react-native:+" // From node_modules
|
2018-02-15 14:59:21 +00:00
|
|
|
compile "com.android.support:support-v4:27.0.2"
|
2018-02-02 08:40:48 +00:00
|
|
|
compile 'me.leolin:ShortcutBadger:1.1.21@aar'
|
2017-06-12 13:43:04 +00:00
|
|
|
compile "com.google.android.gms:play-services-base:$firebaseVersion"
|
|
|
|
compile "com.google.firebase:firebase-core:$firebaseVersion"
|
|
|
|
compile "com.google.firebase:firebase-config:$firebaseVersion"
|
|
|
|
compile "com.google.firebase:firebase-auth:$firebaseVersion"
|
|
|
|
compile "com.google.firebase:firebase-database:$firebaseVersion"
|
|
|
|
compile "com.google.firebase:firebase-storage:$firebaseVersion"
|
|
|
|
compile "com.google.firebase:firebase-messaging:$firebaseVersion"
|
|
|
|
compile "com.google.firebase:firebase-crash:$firebaseVersion"
|
|
|
|
compile "com.google.firebase:firebase-perf:$firebaseVersion"
|
|
|
|
compile "com.google.firebase:firebase-ads:$firebaseVersion"
|
2017-09-27 14:41:25 +00:00
|
|
|
compile "com.google.firebase:firebase-firestore:$firebaseVersion"
|
2017-07-19 11:32:17 +00:00
|
|
|
compile "com.google.firebase:firebase-invites:$firebaseVersion"
|
2018-03-05 00:34:06 +00:00
|
|
|
compile('com.crashlytics.sdk.android:crashlytics:2.9.1@aar') {
|
2017-12-06 17:25:17 +00:00
|
|
|
transitive = true
|
|
|
|
}
|
2017-03-02 11:30:08 +00:00
|
|
|
}
|