Advertisement
kiojiotisha

fadfa

Jul 5th, 2019
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.48 KB | None | 0 0
  1.  
  2. //plugins {
  3. // id 'com.onesignal.androidsdk.onesignal-gradle-plugin' version '0.8.1'
  4. //}
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11. apply plugin: "com.android.application"
  12.  
  13. //apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
  14. //apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
  15.  
  16. import com.android.build.OutputFile
  17.  
  18. /**
  19. * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
  20. * and bundleReleaseJsAndAssets).
  21. * These basically call `react-native bundle` with the correct arguments during the Android build
  22. * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
  23. * bundle directly from the development server. Below you can see all the possible configurations
  24. * and their defaults. If you decide to add a configuration block, make sure to add it before the
  25. * `apply from: "../../node_modules/react-native/react.gradle"` line.
  26. *
  27. * project.ext.react = [
  28. * // the name of the generated asset file containing your JS bundle
  29. * bundleAssetName: "index.android.bundle",
  30. *
  31. * // the entry file for bundle generation
  32. * entryFile: "index.android.js",
  33. *
  34. * // whether to bundle JS and assets in debug mode
  35. * bundleInDebug: false,
  36. *
  37. * // whether to bundle JS and assets in release mode
  38. * bundleInRelease: true,
  39. *
  40. * // whether to bundle JS and assets in another build variant (if configured).
  41. * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
  42. * // The configuration property can be in the following formats
  43. * // 'bundleIn${productFlavor}${buildType}'
  44. * // 'bundleIn${buildType}'
  45. * // bundleInFreeDebug: true,
  46. * // bundleInPaidRelease: true,
  47. * // bundleInBeta: true,
  48. *
  49. * // whether to disable dev mode in custom build variants (by default only disabled in release)
  50. * // for example: to disable dev mode in the staging build type (if configured)
  51. * devDisabledInStaging: true,
  52. * // The configuration property can be in the following formats
  53. * // 'devDisabledIn${productFlavor}${buildType}'
  54. * // 'devDisabledIn${buildType}'
  55. *
  56. * // the root of your project, i.e. where "package.json" lives
  57. * root: "../../",
  58. *
  59. * // where to put the JS bundle asset in debug mode
  60. * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
  61. *
  62. * // where to put the JS bundle asset in release mode
  63. * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
  64. *
  65. * // where to put drawable resources / React Native assets, e.g. the ones you use via
  66. * // require('./image.png')), in debug mode
  67. * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
  68. *
  69. * // where to put drawable resources / React Native assets, e.g. the ones you use via
  70. * // require('./image.png')), in release mode
  71. * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
  72. *
  73. * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
  74. * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
  75. * // date; if you have any other folders that you want to ignore for performance reasons (gradle
  76. * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
  77. * // for example, you might want to remove it from here.
  78. * inputExcludes: ["android/**", "ios/**"],
  79. *
  80. * // override which node gets called and with what additional arguments
  81. * nodeExecutableAndArgs: ["node"],
  82. *
  83. * // supply additional arguments to the packager
  84. * extraPackagerArgs: []
  85. * ]
  86. */
  87.  
  88. project.ext.react = [
  89. bundleAssetName: "index.android.bundle",
  90. // whether to bundle JS and assets in debug mode
  91. bundleInDebug: false,
  92. // whether to bundle JS and assets in release mode
  93. bundleInRelease: true,
  94.  
  95. entryFile: "index.js"
  96. ]
  97.  
  98. apply from: "../../node_modules/react-native/react.gradle"
  99.  
  100. /**
  101. * Set this to true to create two separate APKs instead of one:
  102. * - An APK that only works on ARM devices
  103. * - An APK that only works on x86 devices
  104. * The advantage is the size of the APK is reduced by about 4MB.
  105. * Upload all the APKs to the Play Store and people will download
  106. * the correct one based on the CPU architecture of their device.
  107. */
  108. def enableSeparateBuildPerCPUArchitecture = false
  109.  
  110. /**
  111. * Run Proguard to shrink the Java bytecode in release builds.
  112. */
  113. def enableProguardInReleaseBuilds = false
  114.  
  115. android {
  116. compileSdkVersion 26
  117. buildToolsVersion '26.0.2'
  118.  
  119. defaultConfig {
  120. applicationId "com.fgbmfimobile"
  121. minSdkVersion 16
  122. targetSdkVersion 22
  123. versionCode 105
  124. versionName "1.0"
  125. ndk {
  126. abiFilters "armeabi-v7a", "x86"
  127. }
  128. multiDexEnabled true
  129. manifestPlaceholders = [onesignal_app_id: "5b72d384-b140-4424-8954-8a3b6ae9ed13",
  130. onesignal_google_project_number: "REMOTE"]
  131. }
  132. splits {
  133. abi {
  134. reset()
  135. enable enableSeparateBuildPerCPUArchitecture
  136. universalApk false // If true, also generate a universal APK
  137. include "armeabi-v7a", "x86"
  138. }
  139. }
  140. signingConfigs {
  141. release {
  142. storeFile file(MYAPP_RELEASE_STORE_FILE)
  143. storePassword MYAPP_RELEASE_STORE_PASSWORD
  144. keyAlias MYAPP_RELEASE_KEY_ALIAS
  145. keyPassword MYAPP_RELEASE_KEY_PASSWORD
  146. }
  147. }
  148. buildTypes {
  149. release {
  150. minifyEnabled enableProguardInReleaseBuilds
  151. proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
  152. signingConfig signingConfigs.release
  153. }
  154. }
  155. // applicationVariants are e.g. debug, release
  156. applicationVariants.all { variant ->
  157. variant.outputs.each { output ->
  158. // For each separate APK per architecture, set a unique version code as described here:
  159. // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
  160. def versionCodes = ["armeabi-v7a":1, "x86":2]
  161. def abi = output.getFilter(OutputFile.ABI)
  162. if (abi != null) { // null for the universal-debug, universal-release variants
  163. output.versionCodeOverride =
  164. versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
  165. }
  166. }
  167. }
  168. }
  169.  
  170. dependencies {
  171. compile project(':react-native-youtube')
  172. compile project(':react-native-linear-gradient')
  173. compile project(':react-native-orientation')
  174. compile project(':react-native-keep-awake')
  175. compile project(':react-native-image-picker')
  176. compile project(':react-native-document-picker')
  177. compile project(':react-native-file-picker')
  178. compile project(':react-native-fbsdk')
  179.  
  180. // compile(project(':react-native-onesignal')) {
  181. // exclude group: 'com.google.android.gms'
  182. // }
  183. //compile 'com.onesignal:OneSignal:[3.8.1, 3.99.99)'
  184. compile project(':react-native-onesignal')
  185.  
  186.  
  187. compile project(':react-native-camera')
  188.  
  189. compile(project(':react-native-maps')){
  190. exclude group: 'com.google.android.gms', module: 'play-services-base'
  191. exclude group: 'com.google.android.gms', module: 'play-services-maps'
  192. }
  193.  
  194. compile ('com.google.android.gms:play-services-base:15.0.1') {
  195. force = true;
  196. }
  197. compile ('com.google.android.gms:play-services-maps:15.0.1') {
  198. force = true;
  199. }
  200.  
  201. //compile ('com.google.android.gms:play-services-base:11.2.+') {
  202. // force = true;
  203. //}
  204. //compile ('com.google.android.gms:play-services-maps:11.2.+') {
  205. // force = true;
  206. //}
  207.  
  208. compile project(':react-native-video')
  209. compile project(':react-native-testfairy')
  210. compile project(':react-native-share')
  211. compile project(path: ':react-native-testfairy')
  212. compile project(':react-native-vector-icons')
  213. compile project(':react-native-fetch-blob')
  214. compile fileTree(include: ['*.jar'], dir: 'libs')
  215. compile 'com.android.support:appcompat-v7:23.0.1'
  216. //compile 'com.facebook.react:react-native:+'
  217. compile ("com.facebook.react:react-native:0.50.4") { force = true }
  218. compile 'com.facebook.android:facebook-android-sdk:[4,5)'
  219. // From node_modules
  220.  
  221.  
  222. }
  223.  
  224. // Run this once to be able to run the application with BUCK
  225. // puts all compile dependencies into folder libs for BUCK to use
  226. task copyDownloadableDepsToLibs(type: Copy) {
  227. from configurations.compile
  228. into 'libs'
  229. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement