- apply plugin: "com.android.application"
- import com.android.build.OutputFile
- project.ext.react = [
- entryFile: "index.android.js",
- enableHermes: true,
- hermesCommand: "../../node_modules/hermes-engine/%OS-BIN%/hermes",
- ]
- def enableSeparateBuildPerCPUArchitecture = true
- def enableProguardInReleaseBuilds = true
- android {
- compileSdkVersion 29
- buildToolsVersion "29.0.3"
- dexOptions {
- incremental true
- javaMaxHeapSize "4g"
- preDexLibraries true
- dexInProcess = true
- }
- def versionMajor = 1
- def versionMinor = 0
- def versionPatch = 903
- def versionBuild = 0
- defaultConfig {
- applicationId "xxx"
- minSdkVersion 21
- targetSdkVersion 29
- versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
- versionName "${versionMajor}.${versionMinor}.${versionPatch}"
- multiDexEnabled true
- }
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- 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
- }
- }
- }
- splits {
- abi {
- reset()
- enable enableSeparateBuildPerCPUArchitecture
- universalApk false // If true, also generate a universal APK
- include 'armeabi-v7a','arm64-v8a','x86','x86_64'
- }
- }
- buildTypes {
- release {
- shrinkResources enableProguardInReleaseBuilds
- zipAlignEnabled enableProguardInReleaseBuilds
- minifyEnabled enableProguardInReleaseBuilds
- useProguard enableProguardInReleaseBuilds
- setProguardFiles([getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'])
- signingConfig signingConfigs.release
- }
- }
- lintOptions { checkReleaseBuilds false }
- project.ext.versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a":3, "x86_64":4]
- applicationVariants.all {
- variant -> variant.outputs.each {
- output ->
- output.versionCodeOverride =
- project.ext.versionCodes.get(output.getFilter(com.android.build.OutputFile.ABI), 0) * 1900000 + android.defaultConfig.versionCode
- }
- }
- packagingOptions {
- pickFirst 'lib/x86/libc++_shared.so'
- pickFirst 'lib/arm64-v8a/libc++_shared.so'
- pickFirst 'lib/x86_64/libc++_shared.so'
- pickFirst 'lib/armeabi-v7a/libc++_shared.so'
- }
- }
- configurations.all {
- resolutionStrategy {
- force "com.facebook.soloader:soloader:0.10.1+"
- }
- }
- dependencies {
- compile 'com.android.support:multidex:1.0.3'
- implementation project(':rn-fetch-blob')
- implementation project(':react-native-cookies')
- implementation project(':@react-native-firebase_app')
- implementation project(':react-native-extra-dimensions-android')
- implementation project(':react-native-exception-handler')
- implementation project(':@react-native-community_netinfo')
- implementation project(':@react-native-community_async-storage')
- implementation fileTree(dir: "libs", include: ["*.jar"])
- implementation project(':react-native-fast-image')
- implementation project(':react-native-splash-screen')
- implementation project(':react-native-share')
- implementation project(':react-native-linear-gradient')
- implementation project(':react-native-fs')
- implementation project(':react-native-vector-icons')
- implementation (project(':react-native-device-info')){
- exclude group: "com.google.android.gms"
- }
- implementation 'com.facebook.fresco:fresco:2.0.0'
- implementation 'com.facebook.fresco:animated-gif:2.0.0'
- implementation ('com.google.android.gms:play-services-gcm:17.0.0') {
- force = true;
- }
- implementation project(path: ":@react-native-firebase_analytics")
- implementation project(path: ":@react-native-firebase_messaging")
- implementation 'com.google.android.gms:play-services-base:17.6.0'
- implementation project(':react-native-push-notification')
- implementation "androidx.appcompat:appcompat:1.3.0"
- implementation "com.facebook.react:react-native:+"
- implementation 'androidx.arch.core:core-runtime:2.1.0'
- implementation 'androidx.arch.core:core-common:2.1.0'
- def hermesPath = "../../node_modules/hermes-engine/android/";
- debugImplementation files(hermesPath + "hermes-debug.aar")
- releaseImplementation files(hermesPath + "hermes-release.aar")
- implementation project(':lottie-react-native')
- }
- task copyDownloadableDepsToLibs(type: Copy) {
- from configurations.compile
- into 'libs'
- }
- apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle")
- applyNativeModulesAppBuildGradle(project)
- apply plugin: 'com.google.gms.google-services'