94 lines
3.3 KiB
Groovy
94 lines
3.3 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
def dropboxAppID = ""
|
|
|
|
android {
|
|
compileSdkVersion rootProject.ext.compileSdkVersion
|
|
|
|
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 {
|
|
resValue("string", "dropbox_app_key", "${dropboxAppID}")
|
|
minifyEnabled true
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-debug.pro'
|
|
}
|
|
release {
|
|
resValue("string", "dropbox_app_key", "${dropboxAppID}")
|
|
minifyEnabled true
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-release.pro'
|
|
}
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
}
|
|
|
|
if (dropboxAppID) {
|
|
def dropboxActivity = """<activity
|
|
android:name="com.dropbox.core.android.AuthActivity"
|
|
android:configChanges="orientation|keyboard"
|
|
android:launchMode="singleTask">
|
|
<intent-filter>
|
|
<data android:scheme="db-${dropboxAppID}" />
|
|
<action android:name="android.intent.action.VIEW" />
|
|
<category android:name="android.intent.category.BROWSABLE" />
|
|
<category android:name="android.intent.category.DEFAULT" />
|
|
</intent-filter>
|
|
</activity>""";
|
|
|
|
|
|
applicationVariants.all { variant ->
|
|
variant.outputs.each { output ->
|
|
output.processManifest.doLast {
|
|
File manifestOutFile = new File(output.processManifest.manifestOutputDirectory, "AndroidManifest.xml")
|
|
if (!manifestOutFile.isFile()) {
|
|
manifestOutFile = new File(new File(output.processManifest.manifestOutputDirectory, output.dirName),"AndroidManifest.xml")
|
|
}
|
|
if (manifestOutFile.exists()) {
|
|
def newFileContents = manifestOutFile.getText('UTF-8').replace("</application>", "${dropboxActivity}</application>")
|
|
manifestOutFile.write(newFileContents, 'UTF-8')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compile fileTree(dir: 'libs', include: ['*.jar'])
|
|
compile 'com.android.support:appcompat-v7:22.2.0'
|
|
compile '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'
|
|
}
|
|
|
|
if (project.file('google-services.json').exists()) {
|
|
apply plugin: 'com.google.gms.google-services'
|
|
}
|