build abi-split apk; use stable libwebrtc

This commit is contained in:
Daniel Gultsch 2020-04-19 20:21:31 +02:00
parent 5a0979b41e
commit 7f45f3ab54
1 changed files with 24 additions and 5 deletions

View File

@ -1,3 +1,5 @@
import com.android.build.OutputFile
// Top-level build file where you can add configuration options common to all // Top-level build file where you can add configuration options common to all
// sub-projects/modules. // sub-projects/modules.
buildscript { buildscript {
@ -6,7 +8,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.6.1' classpath 'com.android.tools.build:gradle:3.6.2'
} }
} }
@ -78,12 +80,13 @@ dependencies {
implementation 'com.squareup.okhttp3:okhttp:3.12.10' implementation 'com.squareup.okhttp3:okhttp:3.12.10'
implementation 'com.google.guava:guava:27.1-android' implementation 'com.google.guava:guava:27.1-android'
quicksyImplementation 'io.michaelrocks:libphonenumber-android:8.11.1' quicksyImplementation 'io.michaelrocks:libphonenumber-android:8.11.1'
implementation 'org.webrtc:google-webrtc:1.0.+' implementation fileTree(include: ['libwebrtc-m79.aar'], dir: 'libs')
} }
ext { ext {
travisBuild = System.getenv("TRAVIS") == "true" travisBuild = System.getenv("TRAVIS") == "true"
preDexEnabled = System.getProperty("pre-dex", "true") preDexEnabled = System.getProperty("pre-dex", "true")
abiCodes = ['armeabi-v7a': 1, 'x86': 2, 'x86_64': 3, 'arm64-v8a': 4]
} }
android { android {
@ -92,8 +95,8 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 16 minSdkVersion 16
targetSdkVersion 28 targetSdkVersion 28
versionCode 372 versionCode 374
versionName "2.8.0-beta.2" versionName "2.8.0-beta.3"
archivesBaseName += "-$versionName" archivesBaseName += "-$versionName"
applicationId "eu.siacs.conversations" applicationId "eu.siacs.conversations"
resValue "string", "applicationId", applicationId resValue "string", "applicationId", applicationId
@ -101,6 +104,12 @@ android {
buildConfigField "String", "LOGTAG", "\"conversations\"" buildConfigField "String", "LOGTAG", "\"conversations\""
} }
splits {
abi {
enable true
}
}
dataBinding { dataBinding {
enabled true enabled true
} }
@ -254,4 +263,14 @@ android {
exclude 'META-INF/BCKEY.DSA' exclude 'META-INF/BCKEY.DSA'
exclude 'META-INF/BCKEY.SF' exclude 'META-INF/BCKEY.SF'
} }
android.applicationVariants.all { variant ->
variant.outputs.each { output ->
def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))
if (baseAbiVersionCode != null) {
output.versionCodeOverride = (100 * variant.versionCode) + baseAbiVersionCode
}
}
}
} }