mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-03 11:17:25 +00:00
Installed Timber, updated dependencies
This commit is contained in:
1 parent
7628582fd7
commit
f8d1909737
4 files changed
+26
-19
No files matched your search
+11
-9
@@ -7,14 +7,16 @@ plugins {
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 33
|
||||
buildToolsVersion '33.0.0'
|
||||
namespace 'com.rtbishop.look4sat'
|
||||
compileSdk 34
|
||||
|
||||
defaultConfig {
|
||||
applicationId "com.rtbishop.look4sat"
|
||||
minSdk 21
|
||||
targetSdk 34
|
||||
versionCode 320
|
||||
versionName '3.2.0'
|
||||
targetSdk 33
|
||||
versionCode 312
|
||||
versionName '3.1.2'
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables {
|
||||
@@ -44,11 +46,11 @@ android {
|
||||
kotlinCompilerExtensionVersion compose_compiler_version
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_17.toString()
|
||||
jvmTarget = JavaVersion.VERSION_11.toString()
|
||||
}
|
||||
testOptions {
|
||||
animationsDisabled true
|
||||
@@ -62,7 +64,7 @@ android {
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(17)
|
||||
jvmToolchain(11)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -81,7 +83,7 @@ dependencies {
|
||||
kapt "androidx.room:room-compiler:$room_version"
|
||||
implementation "com.google.dagger:hilt-android:$hilt_version"
|
||||
kapt "com.google.dagger:hilt-compiler:$hilt_version"
|
||||
implementation "com.squareup.okhttp3:okhttp:$okhttp_version"
|
||||
implementation "com.jakewharton.timber:timber:$timber_version"
|
||||
implementation "org.osmdroid:osmdroid-android:$osmdroid_version"
|
||||
|
||||
implementation "androidx.activity:activity-compose:$activity_compose_version"
|
||||
|
||||
@@ -18,10 +18,11 @@
|
||||
package com.rtbishop.look4sat.presentation
|
||||
|
||||
import android.app.Application
|
||||
import android.util.Log
|
||||
import com.rtbishop.look4sat.BuildConfig
|
||||
import com.rtbishop.look4sat.domain.IDataRepository
|
||||
import com.rtbishop.look4sat.framework.SettingsManager
|
||||
import dagger.hilt.android.HiltAndroidApp
|
||||
import timber.log.Timber
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import javax.inject.Inject
|
||||
@@ -37,6 +38,9 @@ class MainApplication : Application() {
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
if (BuildConfig.DEBUG) {
|
||||
Timber.plant(Timber.DebugTree())
|
||||
}
|
||||
checkAutoUpdate()
|
||||
}
|
||||
|
||||
@@ -45,7 +49,7 @@ class MainApplication : Application() {
|
||||
val timeDelta = System.currentTimeMillis() - settingsManager.getLastUpdateTime()
|
||||
if (timeDelta > 172800000) { // 48 hours in ms
|
||||
val sdf = SimpleDateFormat("d MMM yyyy - HH:mm:ss", Locale.getDefault())
|
||||
Log.d("AutoUpdate", "Started periodic data update on ${sdf.format(Date())}")
|
||||
Timber.d("Started periodic data update on ${sdf.format(Date())}")
|
||||
repository.updateFromWeb()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user