You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. buildscript {
  2. repositories {
  3. maven { url 'https://maven.fabric.io/public' }
  4. }
  5. dependencies {
  6. classpath 'io.fabric.tools:gradle:1.+'
  7. }
  8. }
  9. apply plugin: 'com.android.application'
  10. apply plugin: 'io.fabric'
  11. import com.android.build.OutputFile
  12. /**
  13. * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets
  14. * and bundleReleaseJsAndAssets).
  15. * These basically call `react-native bundle` with the correct arguments during the Android build
  16. * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
  17. * bundle directly from the development server. Below you can see all the possible configurations
  18. * and their defaults. If you decide to add a configuration block, make sure to add it before the
  19. * `apply from: "../../node_modules/react-native/react.gradle"` line.
  20. *
  21. * project.ext.react = [
  22. * // the name of the generated asset file containing your JS bundle
  23. * bundleAssetName: "index.android.bundle",
  24. *
  25. * // the entry file for bundle generation
  26. * entryFile: "index.android.js",
  27. *
  28. * // whether to bundle JS and assets in debug mode
  29. * bundleInDebug: false,
  30. *
  31. * // whether to bundle JS and assets in release mode
  32. * bundleInRelease: true,
  33. *
  34. * // whether to bundle JS and assets in another build variant (if configured).
  35. * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
  36. * // The configuration property can be in the following formats
  37. * // 'bundleIn${productFlavor}${buildType}'
  38. * // 'bundleIn${buildType}'
  39. * // bundleInFreeDebug: true,
  40. * // bundleInPaidRelease: true,
  41. * // bundleInBeta: true,
  42. *
  43. * // the root of your project, i.e. where "package.json" lives
  44. * root: "../../",
  45. *
  46. * // where to put the JS bundle asset in debug mode
  47. * jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
  48. *
  49. * // where to put the JS bundle asset in release mode
  50. * jsBundleDirRelease: "$buildDir/intermediates/assets/release",
  51. *
  52. * // where to put drawable resources / React Native assets, e.g. the ones you use via
  53. * // require('./image.png')), in debug mode
  54. * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
  55. *
  56. * // where to put drawable resources / React Native assets, e.g. the ones you use via
  57. * // require('./image.png')), in release mode
  58. * resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
  59. *
  60. * // by default the gradle tasks are skipped if none of the JS files or assets change; this means
  61. * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
  62. * // date; if you have any other folders that you want to ignore for performance reasons (gradle
  63. * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
  64. * // for example, you might want to remove it from here.
  65. * inputExcludes: ["android/**", "ios/**"],
  66. *
  67. * // override which node gets called and with what additional arguments
  68. * nodeExecutableAndArgs: ["node"]
  69. *
  70. * // supply additional arguments to the packager
  71. * extraPackagerArgs: []
  72. * ]
  73. */
  74. apply from: '../../node_modules/react-native/react.gradle'
  75. /**
  76. * Set this to true to create two separate APKs instead of one:
  77. * - An APK that only works on ARM devices
  78. * - An APK that only works on x86 devices
  79. * The advantage is the size of the APK is reduced by about 4MB.
  80. * Upload all the APKs to the Play Store and people will download
  81. * the correct one based on the CPU architecture of their device.
  82. */
  83. def enableSeparateBuildPerCPUArchitecture = false
  84. /**
  85. * Run Proguard to shrink the Java bytecode in release builds.
  86. */
  87. def enableProguardInReleaseBuilds = false
  88. android {
  89. compileSdkVersion 23
  90. buildToolsVersion '23.0.1'
  91. defaultConfig {
  92. applicationId 'org.jitsi.jitsi_meet_react'
  93. minSdkVersion 16
  94. targetSdkVersion 22
  95. versionCode 1
  96. versionName '1.0'
  97. ndk {
  98. abiFilters 'armeabi-v7a', 'x86'
  99. }
  100. packagingOptions {
  101. // The project react-native does not provide 64-bit binaries at the
  102. // time of this writing. Unfortunately, packaging any 64-bit
  103. // binaries into the .apk will crash the app at runtime on 64-bit
  104. // platforms.
  105. exclude 'lib/x86_64/libjingle_peerconnection_so.so'
  106. exclude 'lib/arm64-v8a/libjingle_peerconnection_so.so'
  107. }
  108. }
  109. splits {
  110. abi {
  111. reset()
  112. enable enableSeparateBuildPerCPUArchitecture
  113. universalApk false // If true, also generate a universal APK
  114. include 'armeabi-v7a', 'x86'
  115. }
  116. }
  117. buildTypes {
  118. release {
  119. minifyEnabled enableProguardInReleaseBuilds
  120. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  121. }
  122. }
  123. // applicationVariants are e.g. debug, release
  124. applicationVariants.all { variant ->
  125. variant.outputs.each { output ->
  126. // For each separate APK per architecture, set a unique version code as described here:
  127. // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
  128. def versionCodes = ['armeabi-v7a':1, 'x86':2]
  129. def abi = output.getFilter(OutputFile.ABI)
  130. if (abi != null) { // null for the universal-debug, universal-release variants
  131. output.versionCodeOverride =
  132. versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
  133. }
  134. }
  135. }
  136. }
  137. if (project.hasProperty('JITSI_SIGNING')
  138. && new File(project.property('JITSI_SIGNING')).exists()) {
  139. apply from: project.property('JITSI_SIGNING');
  140. }
  141. repositories {
  142. maven { url 'https://maven.fabric.io/public' }
  143. }
  144. dependencies {
  145. compile project(':react-native-vector-icons')
  146. compile project(':react-native-webrtc')
  147. compile fileTree(dir: 'libs', include: ['*.jar'])
  148. compile 'com.android.support:appcompat-v7:23.0.1'
  149. compile 'com.facebook.react:react-native:+'
  150. compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
  151. transitive = true
  152. }
  153. }
  154. apply from: '../../node_modules/react-native-vector-icons/fonts.gradle'
  155. // Run this once to be able to run the application with BUCK
  156. // puts all compile dependencies into folder libs for BUCK to use
  157. task copyDownloadableDepsToLibs(type: Copy) {
  158. from configurations.compile
  159. into 'libs'
  160. }