mirror of
https://github.com/home-assistant/android
synced 2024-10-02 22:34:46 +00:00
Dependency Updates. (#1643)
* Dependency Updates. Needed to correctly call for Firebase Token in ioScope not main. * Bump coroutines test dep as well.
This commit is contained in:
parent
5df272a8f6
commit
c5ebd99a48
|
@ -121,33 +121,33 @@ dependencies {
|
|||
implementation(project(":common"))
|
||||
|
||||
implementation("com.github.Dimezis:BlurView:version-1.6.6")
|
||||
implementation("org.altbeacon:android-beacon-library:2+")
|
||||
implementation("org.altbeacon:android-beacon-library:2.18")
|
||||
implementation("com.maltaisn:icondialog:3.3.0")
|
||||
implementation("com.maltaisn:iconpack-community-material:5.3.45")
|
||||
implementation("com.vdurmont:emoji-java:5.1.1") {
|
||||
exclude(group = "org.json", module = "json")
|
||||
}
|
||||
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.0")
|
||||
implementation("org.jetbrains.kotlin:kotlin-reflect:1.5.0")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3")
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.21")
|
||||
implementation("org.jetbrains.kotlin:kotlin-reflect:1.5.21")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.1")
|
||||
|
||||
implementation("com.google.dagger:dagger:2.35.1")
|
||||
kapt("com.google.dagger:dagger-compiler:2.35.1")
|
||||
implementation("com.google.dagger:dagger:2.38")
|
||||
kapt("com.google.dagger:dagger-compiler:2.38")
|
||||
|
||||
implementation("androidx.appcompat:appcompat:1.2.0")
|
||||
implementation("androidx.appcompat:appcompat:1.3.1")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.3.1")
|
||||
implementation("androidx.constraintlayout:constraintlayout:2.0.4")
|
||||
implementation("androidx.recyclerview:recyclerview:1.2.0")
|
||||
implementation("androidx.recyclerview:recyclerview:1.2.1")
|
||||
implementation("androidx.preference:preference-ktx:1.1.1")
|
||||
implementation("androidx.navigation:navigation-fragment-ktx:2.3.5")
|
||||
implementation("androidx.navigation:navigation-ui-ktx:2.3.5")
|
||||
implementation("com.google.android.material:material:1.3.0")
|
||||
implementation("com.google.android.material:material:1.4.0")
|
||||
|
||||
implementation("androidx.room:room-runtime:2.2.6")
|
||||
implementation("androidx.room:room-ktx:2.2.6")
|
||||
kapt("androidx.room:room-compiler:2.2.6")
|
||||
implementation("androidx.room:room-runtime:2.3.0")
|
||||
implementation("androidx.room:room-ktx:2.3.0")
|
||||
kapt("androidx.room:room-compiler:2.3.0")
|
||||
|
||||
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.12.4")
|
||||
implementation("com.squareup.okhttp3:okhttp:4.9.1")
|
||||
|
@ -157,8 +157,7 @@ dependencies {
|
|||
"fullImplementation"("com.google.firebase:firebase-core:19.0.0")
|
||||
"fullImplementation"("com.google.firebase:firebase-iid:21.1.0")
|
||||
"fullImplementation"("com.google.firebase:firebase-messaging:22.0.0")
|
||||
"fullImplementation"("io.sentry:sentry-android:4.3.0")
|
||||
"fullImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:1.4.3")
|
||||
"fullImplementation"("io.sentry:sentry-android:5.0.1")
|
||||
|
||||
implementation("androidx.work:work-runtime-ktx:2.5.0")
|
||||
implementation("androidx.biometric:biometric:1.1.0")
|
||||
|
@ -168,13 +167,13 @@ dependencies {
|
|||
testImplementation("org.spekframework.spek2:spek-runner-junit5:2.0.8")
|
||||
testImplementation("org.assertj:assertj-core:3.13.2")
|
||||
testImplementation("io.mockk:mockk:1.12.0")
|
||||
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.4.3")
|
||||
testImplementation("org.altbeacon:android-beacon-library:2+")
|
||||
testImplementation("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.5.1")
|
||||
testImplementation("org.altbeacon:android-beacon-library:2.18")
|
||||
|
||||
implementation("com.google.android.exoplayer:exoplayer-core:2.14.1")
|
||||
implementation("com.google.android.exoplayer:exoplayer-hls:2.14.1")
|
||||
implementation("com.google.android.exoplayer:exoplayer-ui:2.14.1")
|
||||
implementation("com.google.android.exoplayer:extension-cronet:2.14.1")
|
||||
implementation("com.google.android.exoplayer:exoplayer-core:2.14.2")
|
||||
implementation("com.google.android.exoplayer:exoplayer-hls:2.14.2")
|
||||
implementation("com.google.android.exoplayer:exoplayer-ui:2.14.2")
|
||||
implementation("com.google.android.exoplayer:extension-cronet:2.14.2")
|
||||
}
|
||||
|
||||
// Disable to fix memory leak and be compatible with the configuration cache.
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package io.homeassistant.companion.android.launch
|
||||
|
||||
import android.util.Log
|
||||
import com.google.android.gms.tasks.Tasks
|
||||
import com.google.firebase.iid.FirebaseInstanceId
|
||||
import io.homeassistant.companion.android.BuildConfig
|
||||
import io.homeassistant.companion.android.common.data.authentication.AuthenticationRepository
|
||||
import io.homeassistant.companion.android.common.data.integration.DeviceRegistration
|
||||
import io.homeassistant.companion.android.common.data.integration.IntegrationRepository
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.tasks.await
|
||||
import javax.inject.Inject
|
||||
|
||||
class LaunchPresenterImpl @Inject constructor(
|
||||
|
@ -16,13 +16,13 @@ class LaunchPresenterImpl @Inject constructor(
|
|||
integrationUseCase: IntegrationRepository
|
||||
) : LaunchPresenterBase(view, authenticationUseCase, integrationUseCase) {
|
||||
override fun resyncRegistration() {
|
||||
mainScope.launch {
|
||||
ioScope.launch {
|
||||
try {
|
||||
integrationUseCase.updateRegistration(
|
||||
DeviceRegistration(
|
||||
"${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})",
|
||||
null,
|
||||
FirebaseInstanceId.getInstance().instanceId.await().token
|
||||
Tasks.await(FirebaseInstanceId.getInstance().instanceId).token
|
||||
)
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package io.homeassistant.companion.android.onboarding.integration
|
||||
|
||||
import android.util.Log
|
||||
import com.google.android.gms.tasks.Tasks
|
||||
import com.google.firebase.iid.FirebaseInstanceId
|
||||
import io.homeassistant.companion.android.common.data.integration.DeviceRegistration
|
||||
import io.homeassistant.companion.android.common.data.integration.IntegrationRepository
|
||||
import kotlinx.coroutines.tasks.await
|
||||
import javax.inject.Inject
|
||||
|
||||
class MobileAppIntegrationPresenterImpl @Inject constructor(
|
||||
|
@ -18,7 +18,7 @@ class MobileAppIntegrationPresenterImpl @Inject constructor(
|
|||
|
||||
if (!simple) {
|
||||
try {
|
||||
val instanceId = FirebaseInstanceId.getInstance().instanceId.await()
|
||||
val instanceId = Tasks.await(FirebaseInstanceId.getInstance().instanceId)
|
||||
registration.pushToken = instanceId.token
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Unable to get firebase token.", e)
|
||||
|
|
|
@ -20,6 +20,7 @@ abstract class LaunchPresenterBase(
|
|||
}
|
||||
|
||||
internal val mainScope: CoroutineScope = CoroutineScope(Dispatchers.Main + Job())
|
||||
internal val ioScope: CoroutineScope = CoroutineScope(Dispatchers.IO)
|
||||
|
||||
override fun onViewReady() {
|
||||
mainScope.launch {
|
||||
|
|
|
@ -20,6 +20,7 @@ open class MobileAppIntegrationPresenterBase constructor(
|
|||
}
|
||||
|
||||
private val mainScope: CoroutineScope = CoroutineScope(Dispatchers.Main + Job())
|
||||
private val ioScope: CoroutineScope = CoroutineScope(Dispatchers.IO)
|
||||
|
||||
internal open suspend fun createRegistration(simple: Boolean, deviceName: String): DeviceRegistration {
|
||||
return DeviceRegistration(
|
||||
|
@ -30,7 +31,7 @@ open class MobileAppIntegrationPresenterBase constructor(
|
|||
|
||||
override fun onRegistrationAttempt(simple: Boolean, deviceName: String) {
|
||||
view.showLoading()
|
||||
mainScope.launch {
|
||||
ioScope.launch {
|
||||
val deviceRegistration: DeviceRegistration
|
||||
try {
|
||||
deviceRegistration = createRegistration(simple, deviceName)
|
||||
|
|
|
@ -12,10 +12,10 @@ buildscript {
|
|||
maven("https://oss.sonatype.org/content/repositories/snapshots")
|
||||
}
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:4.2.1")
|
||||
classpath("com.android.tools.build:gradle:4.2.2")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0")
|
||||
classpath("com.google.gms:google-services:4.3.8")
|
||||
classpath("com.google.firebase:firebase-appdistribution-gradle:2.1.2")
|
||||
classpath("com.google.firebase:firebase-appdistribution-gradle:2.1.3")
|
||||
classpath("de.mannodermaus.gradle.plugins:android-junit5:1.6.2.0")
|
||||
classpath("com.github.triplet.gradle:play-publisher:3.5.0")
|
||||
}
|
||||
|
|
|
@ -21,19 +21,19 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.0")
|
||||
implementation("org.jetbrains.kotlin:kotlin-reflect:1.5.0")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3")
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.21")
|
||||
implementation("org.jetbrains.kotlin:kotlin-reflect:1.5.21")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.1")
|
||||
|
||||
implementation("com.google.dagger:dagger:2.35.1")
|
||||
kapt("com.google.dagger:dagger-compiler:2.35.1")
|
||||
implementation("com.google.dagger:dagger:2.38")
|
||||
kapt("com.google.dagger:dagger-compiler:2.38")
|
||||
|
||||
implementation("com.squareup.retrofit2:retrofit:2.9.0")
|
||||
implementation("com.squareup.retrofit2:converter-jackson:2.9.0")
|
||||
implementation("com.squareup.okhttp3:okhttp:4.9.1")
|
||||
implementation("com.squareup.okhttp3:logging-interceptor:4.9.1")
|
||||
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.12.4")
|
||||
implementation("org.altbeacon:android-beacon-library:2+")
|
||||
implementation("org.altbeacon:android-beacon-library:2.18")
|
||||
|
||||
testImplementation("com.squareup.okhttp3:mockwebserver:4.9.1")
|
||||
testImplementation("org.spekframework.spek2:spek-dsl-jvm:2.0.8")
|
||||
|
|
|
@ -65,7 +65,7 @@ android {
|
|||
dependencies {
|
||||
implementation(project(":common"))
|
||||
|
||||
implementation("com.google.android.material:material:1.3.0")
|
||||
implementation("com.google.android.material:material:1.4.0")
|
||||
|
||||
implementation("androidx.wear:wear:1.1.0")
|
||||
implementation("com.google.android.support:wearable:2.8.1")
|
||||
|
|
Loading…
Reference in a new issue