mirror of
https://github.com/rt-bishop/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
Added various tweaks to dependencies and translations
This commit is contained in:
1 parent
65a0c33007
commit
9e765a3575
6 files changed
+8
-28
No files matched your search
@@ -1,7 +1,6 @@
|
|||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application)
|
alias(libs.plugins.android.application)
|
||||||
alias(libs.plugins.compose.compiler)
|
alias(libs.plugins.compose.compiler)
|
||||||
alias(libs.plugins.google.ksp)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
@@ -32,7 +31,7 @@ android {
|
|||||||
}
|
}
|
||||||
androidResources {
|
androidResources {
|
||||||
generateLocaleConfig = true
|
generateLocaleConfig = true
|
||||||
localeFilters.addAll(listOf("en", "es-rES", "ru", "si", "uk", "zh-rCN"))
|
localeFilters.addAll(listOf("en", "es", "ru", "si", "uk", "zh"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,14 +40,8 @@ dependencies {
|
|||||||
implementation(project(":domain"))
|
implementation(project(":domain"))
|
||||||
|
|
||||||
implementation(libs.androidx.core.splashscreen)
|
implementation(libs.androidx.core.splashscreen)
|
||||||
implementation(libs.androidx.room)
|
|
||||||
implementation(libs.androidx.room.runtime)
|
|
||||||
ksp(libs.androidx.room.compiler)
|
|
||||||
|
|
||||||
implementation(platform(libs.compose.bom))
|
implementation(platform(libs.compose.bom))
|
||||||
implementation(libs.bundles.composeAll)
|
implementation(libs.bundles.composeAll)
|
||||||
|
|
||||||
implementation(libs.other.okhttp)
|
|
||||||
implementation(libs.other.osmdroid)
|
implementation(libs.other.osmdroid)
|
||||||
|
|
||||||
debugImplementation(libs.bundles.composeDebug)
|
debugImplementation(libs.bundles.composeDebug)
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
package com.rtbishop.look4sat
|
package com.rtbishop.look4sat
|
||||||
|
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
|
import com.rtbishop.look4sat.data.injection.MainContainer
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.Date
|
import java.util.Date
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
|||||||
File renamed without changes.
File renamed without changes.
@@ -22,7 +22,6 @@ dependencies {
|
|||||||
implementation(libs.androidx.room)
|
implementation(libs.androidx.room)
|
||||||
implementation(libs.androidx.room.runtime)
|
implementation(libs.androidx.room.runtime)
|
||||||
ksp(libs.androidx.room.compiler)
|
ksp(libs.androidx.room.compiler)
|
||||||
|
|
||||||
implementation(libs.other.coroutines)
|
implementation(libs.other.coroutines)
|
||||||
implementation(libs.other.okhttp)
|
implementation(libs.other.okhttp)
|
||||||
|
|
||||||
|
|||||||
+6
-19
@@ -1,4 +1,4 @@
|
|||||||
package com.rtbishop.look4sat
|
package com.rtbishop.look4sat.data.injection
|
||||||
|
|
||||||
import android.bluetooth.BluetoothManager
|
import android.bluetooth.BluetoothManager
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
@@ -33,14 +33,11 @@ import kotlinx.coroutines.CoroutineScope
|
|||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.SupervisorJob
|
import kotlinx.coroutines.SupervisorJob
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import org.osmdroid.config.Configuration
|
|
||||||
|
|
||||||
class MainContainer(private val context: Context) {
|
class MainContainer(private val context: Context) {
|
||||||
|
|
||||||
private val localSource = provideLocalSource()
|
private val localSource = provideLocalSource()
|
||||||
private val mainHandler = CoroutineExceptionHandler { _, error ->
|
private val mainHandler = CoroutineExceptionHandler { _, error -> println("MainHandler: $error") }
|
||||||
println("MainHandler: $error")
|
|
||||||
}
|
|
||||||
val appScope = CoroutineScope(SupervisorJob() + Dispatchers.Default + mainHandler)
|
val appScope = CoroutineScope(SupervisorJob() + Dispatchers.Default + mainHandler)
|
||||||
val settingsRepo = provideSettingsRepo()
|
val settingsRepo = provideSettingsRepo()
|
||||||
val selectionRepo = provideSelectionRepo()
|
val selectionRepo = provideSelectionRepo()
|
||||||
@@ -48,26 +45,19 @@ class MainContainer(private val context: Context) {
|
|||||||
val databaseRepo = provideDatabaseRepo()
|
val databaseRepo = provideDatabaseRepo()
|
||||||
|
|
||||||
fun provideAppVersionName(): String {
|
fun provideAppVersionName(): String {
|
||||||
val packageInfo = context.packageManager.getPackageInfo(context.packageName, 0)
|
return context.packageManager.getPackageInfo(context.packageName, 0).versionName ?: "4.0.0"
|
||||||
return packageInfo.versionName ?: "4.0.0"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun provideAddToCalendar(): IAddToCalendar {
|
fun provideAddToCalendar(): IAddToCalendar = AddToCalendar(context)
|
||||||
return AddToCalendar(context)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun provideShowToast(): IShowToast {
|
fun provideShowToast(): IShowToast = ShowToast(context)
|
||||||
return ShowToast(context)
|
|
||||||
}
|
|
||||||
|
|
||||||
fun provideBluetoothReporter(): BluetoothReporter {
|
fun provideBluetoothReporter(): BluetoothReporter {
|
||||||
val manager = context.getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager
|
val manager = context.getSystemService(Context.BLUETOOTH_SERVICE) as BluetoothManager
|
||||||
return BluetoothReporter(manager, CoroutineScope(Dispatchers.IO))
|
return BluetoothReporter(manager, CoroutineScope(Dispatchers.IO))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun provideNetworkReporter(): NetworkReporter {
|
fun provideNetworkReporter(): NetworkReporter = NetworkReporter(CoroutineScope(Dispatchers.IO))
|
||||||
return NetworkReporter(CoroutineScope(Dispatchers.IO))
|
|
||||||
}
|
|
||||||
|
|
||||||
fun provideSensorsRepo(): ISensorsRepo {
|
fun provideSensorsRepo(): ISensorsRepo {
|
||||||
val manager = context.getSystemService(Context.SENSOR_SERVICE) as SensorManager
|
val manager = context.getSystemService(Context.SENSOR_SERVICE) as SensorManager
|
||||||
@@ -104,9 +94,6 @@ class MainContainer(private val context: Context) {
|
|||||||
val manager = context.getSystemService(Context.LOCATION_SERVICE) as LocationManager
|
val manager = context.getSystemService(Context.LOCATION_SERVICE) as LocationManager
|
||||||
val appPrefsFileName = "${context.packageName}_preferences"
|
val appPrefsFileName = "${context.packageName}_preferences"
|
||||||
val appPreferences = context.getSharedPreferences(appPrefsFileName, Context.MODE_PRIVATE)
|
val appPreferences = context.getSharedPreferences(appPrefsFileName, Context.MODE_PRIVATE)
|
||||||
val mapPrefsFileName = "${context.packageName}_osmdroid"
|
|
||||||
val mapPreferences = context.getSharedPreferences(mapPrefsFileName, Context.MODE_PRIVATE)
|
|
||||||
Configuration.getInstance().load(context, mapPreferences)
|
|
||||||
return SettingsRepo(manager, appPreferences)
|
return SettingsRepo(manager, appPreferences)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user