123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- apply plugin: 'com.android.application'
-
- android {
- compileSdkVersion rootProject.ext.compileSdkVersion
- buildToolsVersion rootProject.ext.buildToolsVersion
-
- defaultConfig {
- applicationId 'org.jitsi.meet'
- versionCode Integer.parseInt("${version}")
- versionName "1.9.${version}"
-
- minSdkVersion rootProject.ext.minSdkVersion
- targetSdkVersion rootProject.ext.targetSdkVersion
-
- ndk {
- abiFilters 'armeabi-v7a', 'x86'
- }
-
- packagingOptions {
- // The project react-native does not provide 64-bit binaries at the
- // time of this writing. Unfortunately, packaging any 64-bit
- // binaries into the .apk will crash the app at runtime on 64-bit
- // platforms.
- exclude '/lib/mips64/**'
- exclude '/lib/arm64-v8a/**'
- exclude '/lib/x86_64/**'
- }
- }
-
- buildTypes {
- debug {
- minifyEnabled true
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-debug.pro'
- }
- release {
- minifyEnabled true
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-release.pro'
- }
- }
-
- compileOptions {
- sourceCompatibility JavaVersion.VERSION_1_8
- targetCompatibility JavaVersion.VERSION_1_8
- }
- }
-
- dependencies {
- implementation fileTree(dir: 'libs', include: ['*.jar'])
- implementation "com.android.support:support-v4:${rootProject.ext.supportLibVersion}"
- implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
- implementation 'com.google.android.gms:play-services-auth:15.0.0'
-
- implementation project(':sdk')
-
- debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.1'
- releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.1'
- }
-
- gradle.projectsEvaluated {
- // Dropbox integration
- //
-
- def plistParser = new XmlSlurper(
- /* validating */ false,
- /* namespaceAware */ false,
- /* allowDocTypeDeclaration */ true)
- plistParser.setFeature(
- 'http://apache.org/xml/features/nonvalidating/load-external-dtd',
- false)
- def plist = plistParser.parse('../ios/app/src/Info.plist')
- def dropboxScheme = plist.dict.array.dict.array.string.find { string ->
- string.text().startsWith('db-')
- }
- def dropboxAppKey = dropboxScheme?.text() - 'db-'
-
- if (dropboxAppKey) {
- android.defaultConfig.resValue('string', 'dropbox_app_key', "${dropboxAppKey}")
-
- def dropboxActivity = """
- <activity
- android:configChanges="keyboard|orientation"
- android:launchMode="singleTask"
- android:name="com.dropbox.core.android.AuthActivity">
- <intent-filter>
- <action android:name="android.intent.action.VIEW" />
- <category android:name="android.intent.category.BROWSABLE" />
- <category android:name="android.intent.category.DEFAULT" />
- <data android:scheme="db-${dropboxAppKey}" />
- </intent-filter>
- </activity>""";
-
- android.applicationVariants.all { variant ->
- variant.outputs.each { output ->
- output.processManifest.doLast {
- def f = new File(manifestOutputDirectory, 'AndroidManifest.xml')
- if (!f.isFile()) {
- f = new File(new File(manifestOutputDirectory, output.dirName), 'AndroidManifest.xml')
- }
- if (f.exists()) {
- def charset = 'UTF-8'
- def s = f.getText(charset)
- s = s.replace('</application>', "${dropboxActivity}</application>")
- f.write(s, charset)
- }
- }
- }
- }
- }
- }
-
- if (project.file('google-services.json').exists()) {
- apply plugin: 'com.google.gms.google-services'
- }
|