mirror of
https://github.com/usetrmnl/trmnl-android.git
synced 2026-04-29 13:35:26 -07:00
fix: update libraries and clean up deprecated TrmnlUserApiService
- Bump library versions: activityCompose 1.13.0, circuit 0.33.1, composeBom 2026.03.01, androidXCoreKtx 1.18.0, workManager 2.11.2, coil 3.4.0, mockk 1.14.9, robolectric 4.16.1, datastore 1.2.1, AGP 8.13.2 - Comment out deprecated TrmnlUserApiService provider in NetworkModule - Trim access token in AppSettingsScreen event handler
This commit is contained in:
@@ -12,7 +12,6 @@ import dev.zacsweers.metro.SingleIn
|
||||
import ink.trmnl.android.BuildConfig
|
||||
import ink.trmnl.android.network.RateLimitInterceptor
|
||||
import ink.trmnl.android.network.TrmnlApiService
|
||||
import ink.trmnl.android.network.TrmnlUserApiService
|
||||
import okhttp3.Cache
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.logging.HttpLoggingInterceptor
|
||||
@@ -109,8 +108,8 @@ interface NetworkModule {
|
||||
@SingleIn(AppScope::class)
|
||||
fun provideTrmnlApiService(retrofit: Retrofit): TrmnlApiService = retrofit.create(TrmnlApiService::class.java)
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
@Provides
|
||||
@SingleIn(AppScope::class)
|
||||
fun provideTrmnlUserApiService(retrofit: Retrofit): TrmnlUserApiService = retrofit.create(TrmnlUserApiService::class.java)
|
||||
// @Suppress("DEPRECATION")
|
||||
// @Provides
|
||||
// @SingleIn(AppScope::class)
|
||||
// fun provideTrmnlUserApiService(retrofit: Retrofit): TrmnlUserApiService = retrofit.create(TrmnlUserApiService::class.java)
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ class AppSettingsPresenter(
|
||||
eventSink = { event ->
|
||||
when (event) {
|
||||
is AppSettingsScreen.Event.AccessTokenChanged -> {
|
||||
accessToken = event.token
|
||||
accessToken = event.token.trim()
|
||||
// Clear previous validation when token changes
|
||||
validationResult = null
|
||||
deviceSetupMessage = null
|
||||
|
||||
+29
-13
@@ -1,13 +1,24 @@
|
||||
[versions]
|
||||
activityCompose = "1.12.1"
|
||||
activityCompose = "1.13.0"
|
||||
# https://developer.android.com/jetpack/androidx/releases/compose-material3-adaptive
|
||||
adaptive = "1.2.0"
|
||||
agp = "8.13.2"
|
||||
circuit = "0.31.0"
|
||||
composeBom = "2025.12.00"
|
||||
coreKtx = "1.17.0"
|
||||
|
||||
# Circuit - ⚡️ A Compose-driven architecture for Kotlin and Android applications.
|
||||
# https://github.com/slackhq/circuit
|
||||
circuit = "0.33.1"
|
||||
|
||||
# Compose Bill of Materials (BOM) lets you manage all of your
|
||||
# Compose library versions by specifying only the BOM's version.
|
||||
# https://developer.android.com/develop/ui/compose/bom
|
||||
composeBom = "2026.03.01"
|
||||
|
||||
# AndroidX Core KTX - Kotlin extensions for Android core libraries.
|
||||
# https://developer.android.com/jetpack/androidx/releases/core
|
||||
androidXCoreKtx = "1.18.0"
|
||||
|
||||
espressoCore = "3.7.0"
|
||||
googleFonts = "1.10.0"
|
||||
googleFonts = "1.10.6"
|
||||
junit = "4.13.2"
|
||||
junitVersion = "1.3.0"
|
||||
kotlinxCoroutinesTest = "1.10.2"
|
||||
@@ -45,29 +56,31 @@ moshi = "1.15.2"
|
||||
eithernet = "2.0.0"
|
||||
|
||||
# https://developer.android.com/jetpack/androidx/releases/work
|
||||
workManager = "2.11.0"
|
||||
workManager = "2.11.2"
|
||||
|
||||
# Coil
|
||||
# https://github.com/coil-kt/coil
|
||||
coil = "3.3.0"
|
||||
coil = "3.4.0"
|
||||
|
||||
mockk = "1.14.7"
|
||||
mockk = "1.14.9"
|
||||
truth = "1.4.5"
|
||||
robolectric = "4.16"
|
||||
robolectric = "4.16.1"
|
||||
turbine = "1.2.1"
|
||||
|
||||
datastore = "1.2.0"
|
||||
datastore = "1.2.1"
|
||||
|
||||
# https://developer.android.com/jetpack/androidx/releases/window
|
||||
# https://developer.android.com/develop/ui/compose/layouts/adaptive
|
||||
androidx-window = "1.5.1"
|
||||
coreKtxVersion = "1.7.0"
|
||||
|
||||
# https://developer.android.com/jetpack/androidx/releases/test
|
||||
androidTestCoreKtxVersion = "1.7.0"
|
||||
|
||||
[libraries]
|
||||
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
|
||||
androidx-adaptive = { module = "androidx.compose.material3.adaptive:adaptive", version.ref = "adaptive" }
|
||||
androidx-compose-bom = { group = "androidx.compose", name = "compose-bom", version.ref = "composeBom" }
|
||||
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
||||
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "androidXCoreKtx" }
|
||||
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
|
||||
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
|
||||
androidx-lifecycle-runtime-ktx = { group = "androidx.lifecycle", name = "lifecycle-runtime-ktx", version.ref = "lifecycleRuntimeKtx" }
|
||||
@@ -140,7 +153,10 @@ test-mockk = { module = "io.mockk:mockk", version.ref = "mockk" }
|
||||
# Truth - Fluent assertions for Java and Android
|
||||
# https://truth.dev/
|
||||
test-truth = { module = "com.google.truth:truth", version.ref = "truth" }
|
||||
core-ktx = { group = "androidx.test", name = "core-ktx", version.ref = "coreKtxVersion" }
|
||||
|
||||
# Test core library with Kotlin extensions for Android
|
||||
# https://developer.android.com/jetpack/androidx/releases/test
|
||||
core-ktx = { group = "androidx.test", name = "core-ktx", version.ref = "androidTestCoreKtxVersion" }
|
||||
|
||||
# https://robolectric.org/getting-started/#building-with-gradle-kotlin
|
||||
test-robolectric = { module = "org.robolectric:robolectric", version.ref = "robolectric" }
|
||||
|
||||
Reference in New Issue
Block a user