diff --git a/app/build.gradle b/app/build.gradle index 293dd7969..b0e47feb0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,6 +6,7 @@ apply plugin: 'kotlin-kapt' apply plugin: "org.jlleitschuh.gradle.ktlint" + static def getPackageName() { return "org.linphone" } @@ -15,6 +16,14 @@ static def firebaseEnabled() { return googleFile.exists() } +static def crashlyticsEnabled() { + return true +} + +if (crashlyticsEnabled()) { + apply plugin: 'com.google.firebase.crashlytics' +} + def gitBranch = new ByteArrayOutputStream() task getGitVersion() { def gitVersion = "5.0.0" @@ -156,6 +165,14 @@ android { if (!firebaseEnabled()) { resValue "string", "gcm_defaultSenderId", "none" } + + if (crashlyticsEnabled()) { + firebaseCrashlytics { + nativeSymbolUploadEnabled true + strippedNativeLibsDir file(LinphoneSdkBuildDir + '/libs/').toString() + unstrippedNativeLibsDir file(LinphoneSdkBuildDir + '/libs-debug/').toString() + } + } } } @@ -191,16 +208,16 @@ dependencies { implementation 'androidx.appcompat:appcompat:1.2.0' implementation 'androidx.media:media:1.2.0' - implementation 'androidx.fragment:fragment-ktx:1.2.5' + implementation 'androidx.fragment:fragment-ktx:1.3.0' implementation 'androidx.core:core-ktx:1.5.0-beta01' implementation 'androidx.navigation:navigation-fragment-ktx:2.3.3' implementation 'androidx.navigation:navigation-ui-ktx:2.3.3' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' - implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0' + implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.0' implementation 'androidx.recyclerview:recyclerview:1.1.0' - implementation 'com.google.android.material:material:1.2.1' + implementation 'com.google.android.material:material:1.3.0' implementation 'com.google.android:flexbox:2.0.0' implementation 'androidx.emoji:emoji:1.1.0' @@ -209,8 +226,12 @@ dependencies { implementation 'com.github.bumptech.glide:glide:4.12.0' kapt 'com.github.bumptech.glide:compiler:4.12.0' + implementation platform('com.google.firebase:firebase-bom:26.4.0') + if (crashlyticsEnabled()) { + implementation 'com.google.firebase:firebase-crashlytics-ndk' + } if (firebaseEnabled()) { - implementation 'com.google.firebase:firebase-messaging:19.0.1' + implementation 'com.google.firebase:firebase-messaging' } implementation 'org.linphone:linphone-sdk-android:4.5+' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 72797fc85..ade022dfe 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -35,7 +35,8 @@ android:label="${appLabel}" android:roundIcon="@mipmap/ic_launcher_round" android:extractNativeLibs="${extractNativeLibs}" - android:theme="@style/AppTheme"> + android:theme="@style/AppTheme" + android:allowNativeHeapPointerTagging="false">