Created
October 12, 2017 14:31
-
-
Save alfonsodev/966f6c26e106d1c67c129201b2b04740 to your computer and use it in GitHub Desktop.
react-native-firebase issue with react-native-navigation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: "com.android.application" | |
import com.android.build.OutputFile | |
apply from: "../../node_modules/react-native/react.gradle" | |
def enableSeparateBuildPerCPUArchitecture = false | |
/** | |
* Run Proguard to shrink the Java bytecode in release builds. | |
*/ | |
def enableProguardInReleaseBuilds = false | |
android { | |
compileSdkVersion 25 | |
buildToolsVersion "25.0.1" | |
dexOptions { | |
jumboMode true | |
} | |
defaultConfig { | |
applicationId "com.mouj" | |
minSdkVersion 16 | |
targetSdkVersion 23 | |
versionCode 4 | |
versionName "1.0" | |
multiDexEnabled true | |
ndk { | |
abiFilters "armeabi-v7a", "x86" | |
} | |
} | |
splits { | |
abi { | |
reset() | |
enable enableSeparateBuildPerCPUArchitecture | |
universalApk false // If true, also generate a universal APK | |
include "armeabi-v7a", "x86" | |
} | |
} | |
signingConfigs { | |
release { | |
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) { | |
storeFile file(MYAPP_RELEASE_STORE_FILE) | |
storePassword MYAPP_RELEASE_STORE_PASSWORD | |
keyAlias MYAPP_RELEASE_KEY_ALIAS | |
keyPassword MYAPP_RELEASE_KEY_PASSWORD | |
} | |
} | |
} | |
buildTypes { | |
release { | |
signingConfig signingConfigs.release | |
minifyEnabled enableProguardInReleaseBuilds | |
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" | |
} | |
} | |
// 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 | |
} | |
} | |
} | |
} | |
dependencies { | |
compile project(':react-native-twitter-signin') | |
compile project(':react-native-fbsdk') | |
compile project(':react-native-localization') | |
compile project(':react-native-linear-gradient') | |
compile project(':react-native-audio') | |
compile project(':react-native-fs') | |
compile project(':react-native-mapbox-gl') | |
compile project(':react-native-mixpanel') | |
compile project(':react-native-navigation') | |
compile project(':react-native-sound') | |
compile fileTree(dir: "libs", include: ["*.jar"]) | |
compile "com.android.support:appcompat-v7:23.0.1" | |
compile "com.facebook.react:react-native:+" // From node_modules | |
compile(project(':react-native-firebase')) { | |
transitive = false | |
} | |
compile "com.google.firebase:firebase-auth:11.0.1" | |
compile "com.google.firebase:firebase-config:11.0.1" | |
compile "com.google.firebase:firebase-core:11.0.1" | |
compile "com.google.firebase:firebase-database:11.0.1" | |
compile "com.google.firebase:firebase-messaging:11.0.1" | |
compile "com.google.firebase:firebase-storage:11.0.1" | |
} | |
apply plugin: 'com.google.gms.google-services' | |
// 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' | |
} | |
configurations.all { | |
resolutionStrategy { | |
force "com.squareup.okhttp3:okhttp:3.4.2" | |
force "com.squareup.okhttp3:okhttp-ws:3.4.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment