From 2e8f6f87e1d92368e505aa1eb117b8db7d34883a Mon Sep 17 00:00:00 2001 From: juandiana Date: Tue, 17 Feb 2026 15:53:43 -0300 Subject: [PATCH] Remove unused ResourcesProvider APIs and core-ktx dependency --- app/build.gradle.kts | 1 - .../reflexgame/app/ResourcesProvider.kt | 24 ------------------- gradle/libs.versions.toml | 2 -- 3 files changed, 27 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index a9d3892..1171e8c 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -46,7 +46,6 @@ kotlin { } dependencies { - implementation(libs.androidx.core.ktx) implementation(libs.androidx.activity.compose) implementation(libs.androidx.lifecycle.viewmodel.ktx) implementation(libs.androidx.lifecycle.runtime.compose) diff --git a/app/src/main/kotlin/com/juandiana/reflexgame/app/ResourcesProvider.kt b/app/src/main/kotlin/com/juandiana/reflexgame/app/ResourcesProvider.kt index a5af62c..24af772 100644 --- a/app/src/main/kotlin/com/juandiana/reflexgame/app/ResourcesProvider.kt +++ b/app/src/main/kotlin/com/juandiana/reflexgame/app/ResourcesProvider.kt @@ -1,34 +1,10 @@ package com.juandiana.reflexgame.app import android.content.Context -import androidx.annotation.ArrayRes -import androidx.annotation.ColorRes -import androidx.annotation.PluralsRes import androidx.annotation.StringRes -import androidx.core.content.ContextCompat class ResourcesProvider(private val appContext: Context) { fun getString(@StringRes resId: Int): String { return appContext.getString(resId) } - - fun getString(@StringRes resId: Int, vararg formatArgs: Any?): String { - return appContext.getString(resId, *formatArgs) - } - - fun getQuantityString(@PluralsRes id: Int, quantity: Int, vararg formatArgs: Any?): String { - return appContext.resources.getQuantityString(id, quantity, *formatArgs) - } - - fun getColor(@ColorRes colorResId: Int): Int { - return ContextCompat.getColor(appContext, colorResId) - } - - fun getCacheDirFilePath(): String { - return appContext.cacheDir.absolutePath - } - - fun getStringArray(@ArrayRes stringArrayResId: Int): Array { - return appContext.resources.getStringArray(stringArrayResId) - } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index cdd9216..e10eb7d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,6 @@ [versions] android-gradle-plugin = "9.0.1" kotlin = "2.3.10" -androidx-core-ktx = "1.17.0" androidx-activity = "1.12.4" androidx-lifecycle = "2.10.0" androidx-compose-bom = "2026.02.00" @@ -12,7 +11,6 @@ android-application = { id = "com.android.application", version.ref = "android-g kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } [libraries] -androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidx-core-ktx" } androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activity" } androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidx-lifecycle" } androidx-lifecycle-runtime-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidx-lifecycle" }