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 4.0KB

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