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.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. apply plugin: 'com.android.application'
  2. boolean googleServicesEnabled = project.file('google-services.json').exists()
  3. // Crashlytics integration is done as part of Firebase now, so it gets
  4. // automagically activated with google-services.json
  5. if (googleServicesEnabled) {
  6. apply plugin: 'io.fabric'
  7. }
  8. android {
  9. compileSdkVersion rootProject.ext.compileSdkVersion
  10. buildToolsVersion rootProject.ext.buildToolsVersion
  11. defaultConfig {
  12. applicationId 'org.jitsi.meet'
  13. versionCode Integer.parseInt(project.buildNumber)
  14. versionName project.appVersion
  15. minSdkVersion rootProject.ext.minSdkVersion
  16. targetSdkVersion rootProject.ext.targetSdkVersion
  17. ndk {
  18. abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
  19. }
  20. }
  21. buildTypes {
  22. debug {
  23. minifyEnabled true
  24. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-debug.pro'
  25. buildConfigField "boolean", "GOOGLE_SERVICES_ENABLED", "${googleServicesEnabled}"
  26. }
  27. release {
  28. minifyEnabled true
  29. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-release.pro'
  30. buildConfigField "boolean", "GOOGLE_SERVICES_ENABLED", "${googleServicesEnabled}"
  31. }
  32. }
  33. compileOptions {
  34. sourceCompatibility JavaVersion.VERSION_1_8
  35. targetCompatibility JavaVersion.VERSION_1_8
  36. }
  37. }
  38. repositories {
  39. maven { url 'https://maven.fabric.io/public' }
  40. }
  41. dependencies {
  42. implementation fileTree(dir: 'libs', include: ['*.jar'])
  43. implementation "com.android.support:support-v4:${rootProject.ext.supportLibVersion}"
  44. implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
  45. implementation 'com.google.android.gms:play-services-auth:16.0.1'
  46. implementation project(':sdk')
  47. debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.1'
  48. releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.1'
  49. // Glide
  50. implementation("com.github.bumptech.glide:glide:${rootProject.ext.glideVersion}") {
  51. exclude group: "com.android.support", module: "glide"
  52. }
  53. implementation("com.github.bumptech.glide:annotations:${rootProject.ext.glideVersion}") {
  54. exclude group: "com.android.support", module: "annotations"
  55. }
  56. annotationProcessor "com.github.bumptech.glide:compiler:${rootProject.ext.glideVersion}"
  57. // Firebase
  58. // - Crashlytics
  59. // - Dynamic Links
  60. implementation 'com.google.firebase:firebase-core:16.0.6'
  61. implementation 'com.crashlytics.sdk.android:crashlytics:2.9.8'
  62. implementation 'com.google.firebase:firebase-dynamic-links:16.1.5'
  63. }
  64. gradle.projectsEvaluated {
  65. // Dropbox integration
  66. //
  67. def dropboxAppKey
  68. if (project.file('dropbox.key').exists()) {
  69. dropboxAppKey = project.file('dropbox.key').text.trim() - 'db-'
  70. }
  71. if (dropboxAppKey) {
  72. android.defaultConfig.resValue('string', 'dropbox_app_key', "${dropboxAppKey}")
  73. def dropboxActivity = """
  74. <activity
  75. android:configChanges="keyboard|orientation"
  76. android:launchMode="singleTask"
  77. android:name="com.dropbox.core.android.AuthActivity">
  78. <intent-filter>
  79. <action android:name="android.intent.action.VIEW" />
  80. <category android:name="android.intent.category.BROWSABLE" />
  81. <category android:name="android.intent.category.DEFAULT" />
  82. <data android:scheme="db-${dropboxAppKey}" />
  83. </intent-filter>
  84. </activity>"""
  85. android.applicationVariants.all { variant ->
  86. variant.outputs.each { output ->
  87. output.processManifest.doLast {
  88. def outputDir = manifestOutputDirectory.get().asFile
  89. def manifestPath = new File(outputDir, 'AndroidManifest.xml')
  90. def charset = 'UTF-8'
  91. def text
  92. text = manifestPath.getText(charset)
  93. text = text.replace('</application>', "${dropboxActivity}</application>")
  94. manifestPath.write(text, charset)
  95. }
  96. }
  97. }
  98. }
  99. }
  100. if (googleServicesEnabled) {
  101. apply plugin: 'com.google.gms.google-services'
  102. }