Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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<String> {
return appContext.resources.getStringArray(stringArrayResId)
}
}
2 changes: 0 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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" }
Expand Down