Advertisement
Guest User

Untitled

a guest
Aug 18th, 2018
428
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.66 KB | None | 0 0
  1. apply plugin: "com.android.application"
  2.  
  3. import com.android.build.OutputFile
  4.  
  5. project.ext.react = [
  6. entryFile: "index.js"
  7. ]
  8.  
  9. apply from: "react.gradle"
  10.  
  11. project.ext.envConfigFiles = [
  12. debug: ".env.development",
  13. release: ".env.production"
  14. ]
  15.  
  16. apply from: project(":react-native-config").projectDir.getPath() + "/dotenv.gradle"
  17.  
  18. project.ext.vectoricons = [
  19. iconFontNames: [ "Feather.ttf", "Ionicons.ttf" ]
  20. ]
  21.  
  22. apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
  23.  
  24. def enableSeparateBuildPerCPUArchitecture = true
  25. def enableProguardInReleaseBuilds = true
  26.  
  27. android {
  28. compileSdkVersion 27
  29. buildToolsVersion "27.0.3"
  30.  
  31. compileOptions {
  32. sourceCompatibility JavaVersion.VERSION_1_8
  33. targetCompatibility JavaVersion.VERSION_1_8
  34. }
  35. dexOptions {
  36. preDexLibraries false
  37. javaMaxHeapSize "8g"
  38. }
  39. defaultConfig {
  40. applicationId "com.testing.webrtc"
  41. minSdkVersion 19
  42. targetSdkVersion 22
  43. versionCode 2
  44. versionName "1.0"
  45. ndk {
  46. //abiFilters "armeabi-v7a", "x86"
  47. }
  48. }
  49. splits {
  50. abi {
  51. reset()
  52. enable enableSeparateBuildPerCPUArchitecture
  53. universalApk true
  54. include "armeabi-v7a", "x86"
  55. }
  56. }
  57. signingConfigs {
  58. release {
  59. storeFile file(RELEASE_STORE_FILE)
  60. storePassword RELEASE_STORE_PASSWORD
  61. keyAlias RELEASE_KEY_ALIAS
  62. keyPassword RELEASE_KEY_PASSWORD
  63. }
  64. }
  65. buildTypes {
  66. release {
  67. signingConfig signingConfigs.release
  68. debuggable false
  69. zipAlignEnabled true
  70. minifyEnabled enableProguardInReleaseBuilds
  71. shrinkResources enableProguardInReleaseBuilds
  72. useProguard enableProguardInReleaseBuilds
  73. proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
  74. }
  75. }
  76. // applicationVariants are e.g. debug, release
  77. applicationVariants.all { variant ->
  78. variant.outputs.each { output ->
  79. def versionCodes = ["armeabi-v7a":1, "x86":2]
  80. def abi = output.getFilter(OutputFile.ABI)
  81.  
  82. if (abi != null) {
  83. output.versionCodeOverride = versionCodes.get(abi) * 2048576 + defaultConfig.versionCode
  84. defaultConfig.versionCode = output.versionCodeOverride
  85. }
  86. }
  87. }
  88. }
  89.  
  90. dependencies {
  91. implementation fileTree(dir: "libs", include: ["*.jar"])
  92. implementation "com.android.support:appcompat-v7:27.0.2"
  93. implementation "com.android.support:support-v4:27.0.2"
  94. implementation "com.facebook.react:react-native:+"
  95.  
  96. implementation project(':react-native-firebase')
  97. implementation "com.google.android.gms:play-services-base:15.0.1"
  98. implementation "com.google.firebase:firebase-core:16.0.1"
  99. implementation "com.google.firebase:firebase-ads:15.0.1"
  100. implementation "com.google.firebase:firebase-messaging:17.1.0"
  101. implementation "me.leolin:ShortcutBadger:1.1.21@aar"
  102.  
  103. implementation project(':realm')
  104. implementation project(':react-native-config')
  105. implementation project(':react-native-vector-icons')
  106. implementation project(':WebRTCModule')
  107. implementation project(':react-native-orientation')
  108. implementation project(':react-native-incall-manager')
  109. implementation project(':react-native-sensitive-info')
  110. implementation project(':react-native-spinkit')
  111. }
  112.  
  113. task copyDownloadableDepsToLibs(type: Copy) {
  114. from configurations.compile
  115. into 'libs'
  116. }
  117.  
  118. apply plugin: 'com.google.gms.google-services'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement