ganfra
2 years ago
9 changed files with 37 additions and 48 deletions
@ -1,36 +0,0 @@
@@ -1,36 +0,0 @@
|
||||
plugins { |
||||
id 'com.android.library' |
||||
id 'org.jetbrains.kotlin.android' |
||||
} |
||||
|
||||
android { |
||||
namespace 'io.element.android.x.sdk.matrix' |
||||
compileSdk 33 |
||||
|
||||
defaultConfig { |
||||
minSdk 29 |
||||
targetSdk 33 |
||||
} |
||||
|
||||
buildTypes { |
||||
release { |
||||
minifyEnabled false |
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
||||
} |
||||
} |
||||
compileOptions { |
||||
sourceCompatibility JavaVersion.VERSION_1_8 |
||||
targetCompatibility JavaVersion.VERSION_1_8 |
||||
} |
||||
kotlinOptions { |
||||
jvmTarget = '1.8' |
||||
} |
||||
} |
||||
|
||||
dependencies { |
||||
api(name: 'matrix-rust-sdk', ext: 'aar') |
||||
implementation project(":libraries:core") |
||||
implementation "net.java.dev.jna:jna:5.10.0@aar" |
||||
implementation 'androidx.datastore:datastore-core:1.0.0' |
||||
implementation 'androidx.datastore:datastore-preferences:1.0.0' |
||||
} |
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
plugins { |
||||
id("io.element.android-library") |
||||
} |
||||
|
||||
android { |
||||
namespace = "io.element.android.x.sdk.matrix" |
||||
} |
||||
|
||||
dependencies { |
||||
api(files("./libs/matrix-rust-sdk.aar")) |
||||
implementation(project(":libraries:core")) |
||||
implementation(libs.timber) |
||||
implementation("net.java.dev.jna:jna:5.10.0@aar") |
||||
implementation("androidx.datastore:datastore-core:1.0.0") |
||||
implementation("androidx.datastore:datastore-preferences:1.0.0") |
||||
} |
@ -1,16 +1,15 @@
@@ -1,16 +1,15 @@
|
||||
package io.element.android.x.matrix.util |
||||
|
||||
import android.util.Log |
||||
import io.element.android.x.matrix.LOG_TAG |
||||
import org.matrix.rustcomponents.sdk.ClientException |
||||
import timber.log.Timber |
||||
|
||||
fun logError(throwable: Throwable) { |
||||
when (throwable) { |
||||
is ClientException.Generic -> { |
||||
Log.e(LOG_TAG, "Error ${throwable.msg}", throwable) |
||||
Timber.e("Error ${throwable.msg}", throwable) |
||||
} |
||||
else -> { |
||||
Log.e(LOG_TAG, "Error", throwable) |
||||
Timber.e("Error", throwable) |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue