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.

build.gradle 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. apply plugin: 'com.android.application'
  2. android {
  3. compileSdkVersion rootProject.ext.compileSdkVersion
  4. defaultConfig {
  5. applicationId 'org.jitsi.meet'
  6. versionCode Integer.parseInt("${version}")
  7. versionName "1.9.${version}"
  8. minSdkVersion rootProject.ext.minSdkVersion
  9. targetSdkVersion rootProject.ext.targetSdkVersion
  10. ndk {
  11. abiFilters 'armeabi-v7a', 'x86'
  12. }
  13. packagingOptions {
  14. // The project react-native does not provide 64-bit binaries at the
  15. // time of this writing. Unfortunately, packaging any 64-bit
  16. // binaries into the .apk will crash the app at runtime on 64-bit
  17. // platforms.
  18. exclude '/lib/mips64/**'
  19. exclude '/lib/arm64-v8a/**'
  20. exclude '/lib/x86_64/**'
  21. }
  22. }
  23. buildTypes {
  24. debug {
  25. minifyEnabled true
  26. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-debug.pro'
  27. }
  28. release {
  29. minifyEnabled true
  30. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-release.pro'
  31. }
  32. }
  33. compileOptions {
  34. sourceCompatibility JavaVersion.VERSION_1_8
  35. targetCompatibility JavaVersion.VERSION_1_8
  36. }
  37. }
  38. dependencies {
  39. compile fileTree(dir: 'libs', include: ['*.jar'])
  40. compile 'com.android.support:appcompat-v7:22.2.0'
  41. compile 'com.google.android.gms:play-services-auth:15.0.0'
  42. implementation project(':sdk')
  43. debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.1'
  44. releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.1'
  45. }
  46. gradle.projectsEvaluated {
  47. // Dropbox integration
  48. //
  49. def plistParser = new XmlSlurper(
  50. /* validating */ false,
  51. /* namespaceAware */ false,
  52. /* allowDocTypeDeclaration */ true)
  53. plistParser.setFeature(
  54. 'http://apache.org/xml/features/nonvalidating/load-external-dtd',
  55. false)
  56. def plist = plistParser.parse('../ios/app/src/Info.plist')
  57. def dropboxScheme = plist.dict.array.dict.array.string.find { string ->
  58. string.text().startsWith('db-')
  59. }
  60. def dropboxAppKey = dropboxScheme?.text() - 'db-'
  61. if (dropboxAppKey) {
  62. android.defaultConfig.resValue('string', 'dropbox_app_key', "${dropboxAppKey}")
  63. def dropboxActivity = """
  64. <activity
  65. android:configChanges="keyboard|orientation"
  66. android:launchMode="singleTask"
  67. android:name="com.dropbox.core.android.AuthActivity">
  68. <intent-filter>
  69. <action android:name="android.intent.action.VIEW" />
  70. <category android:name="android.intent.category.BROWSABLE" />
  71. <category android:name="android.intent.category.DEFAULT" />
  72. <data android:scheme="db-${dropboxAppKey}" />
  73. </intent-filter>
  74. </activity>""";
  75. android.applicationVariants.all { variant ->
  76. variant.outputs.each { output ->
  77. output.processManifest.doLast {
  78. def f = new File(manifestOutputDirectory, 'AndroidManifest.xml')
  79. if (!f.isFile()) {
  80. f = new File(new File(manifestOutputDirectory, output.dirName), 'AndroidManifest.xml')
  81. }
  82. if (f.exists()) {
  83. def charset = 'UTF-8'
  84. def s = f.getText(charset)
  85. s = s.replace('</application>', "${dropboxActivity}</application>")
  86. f.write(s, charset)
  87. }
  88. }
  89. }
  90. }
  91. }
  92. }
  93. if (project.file('google-services.json').exists()) {
  94. apply plugin: 'com.google.gms.google-services'
  95. }