Skip to content

Commit

Permalink
Update dependencies version (#18)
Browse files Browse the repository at this point in the history
## Context
Updating libraries and changing to the correct `measureTimeMillis`
  • Loading branch information
cmorigaki authored Aug 25, 2020
1 parent b55061b commit 100cd2f
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 19 deletions.
9 changes: 9 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ class ApplicationStartAnalytics(
private var firstActivityCreated = false
private var hasSavedState = false

fun watch(duration: Double) {
fun watch(duration: Long) {
application.registerActivityLifecycleCallbacks(this)
Handler().post {
if (firstActivityCreated) {
if (hasSavedState) {
analytics.sendEvent(
AppStartEvent(InitMode.LUKEWARM_START, duration.toLong())
AppStartEvent(InitMode.LUKEWARM_START, duration)
)
} else {
analytics.sendEvent(
AppStartEvent(InitMode.COLD_START, duration.toLong())
AppStartEvent(InitMode.COLD_START, duration)
)
}
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/br/com/recipebook/CustomApplication.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import br.com.recipebook.startup.StartupJobsExecutor
import io.sentry.android.core.SentryAndroid
import kotlinx.coroutines.runBlocking
import org.koin.android.ext.android.inject
import org.koin.core.time.measureDuration
import kotlin.system.measureTimeMillis

class CustomApplication : Application() {

Expand All @@ -16,7 +16,7 @@ class CustomApplication : Application() {
override fun onCreate() {
super.onCreate()

val startupDuration = measureDuration {
val startupDuration = measureTimeMillis {
// Crash report must be the first thing to initialize!
if (!BuildConfig.DEBUG) {
SentryAndroid.init(this)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
// classpath EnvironmentConfig.gradleTools
// classpath EnvironmentConfig.gradlePlugin
classpath 'com.android.tools.build:gradle:4.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0"

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
26 changes: 13 additions & 13 deletions project-config/dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ext {
kotlinVersion = "1.3.72"
kotlinVersion = "1.4.0"
gradleVersion = "4.0.1"
jvmTargetVersion = "1.8"

Expand All @@ -23,31 +23,31 @@ ext {
]

AndroidLibConfig = [
coreKtx: "androidx.core:core-ktx:1.2.0",
coroutinesCore: "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7",
coreKtx: "androidx.core:core-ktx:1.3.1",
coroutinesCore: "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9",

// Network related libraries
retrofit: "com.squareup.retrofit2:retrofit:2.8.1",
moshiConverter: "com.squareup.retrofit2:converter-moshi:2.8.1",
moshiCodeGen: "com.squareup.moshi:moshi-kotlin-codegen:1.9.2",
moshi: "com.squareup.moshi:moshi:1.9.2",
retrofit: "com.squareup.retrofit2:retrofit:2.9.0",
moshiConverter: "com.squareup.retrofit2:converter-moshi:2.9.0",
moshiCodeGen: "com.squareup.moshi:moshi-kotlin-codegen:1.9.3",
moshi: "com.squareup.moshi:moshi:1.9.3",

// Android components
appCompat: "androidx.appcompat:appcompat:1.1.0",
appCompat: "androidx.appcompat:appcompat:1.2.0",
constraintLayout: "androidx.constraintlayout:constraintlayout:1.1.3",
recyclerView: "androidx.recyclerview:recyclerview:1.1.0",
cardView: "androidx.cardview:cardview:1.0.0",
viewmodel: "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0",
fragment: "androidx.fragment:fragment-ktx:1.2.2",
fragment: "androidx.fragment:fragment-ktx:1.2.5",
swipeRefresh: "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0",
coordinatorLayout: "androidx.coordinatorlayout:coordinatorlayout:1.1.0",
material: "com.google.android.material:material:1.1.0",

// DI
koinAndroid: "org.koin:koin-android:2.1.5", // Koin for Android
koinLifecycle: "org.koin:koin-androidx-scope:2.1.5", // or Koin for Lifecycle scoping
koinViewModel: "org.koin:koin-androidx-viewmodel:2.1.5", // or Koin for Android Architecture ViewModel
koinFragment: "org.koin:koin-androidx-fragment:2.1.5", // or Koin for Android Fragment Factory (unstable version)
koinAndroid: "org.koin:koin-android:2.1.6", // Koin for Android
koinLifecycle: "org.koin:koin-androidx-scope:2.1.6", // or Koin for Lifecycle scoping
koinViewModel: "org.koin:koin-androidx-viewmodel:2.1.6", // or Koin for Android Architecture ViewModel
koinFragment: "org.koin:koin-androidx-fragment:2.1.6", // or Koin for Android Fragment Factory (unstable version)

// Image download library
fresco: "com.facebook.fresco:fresco:2.2.0",
Expand Down

0 comments on commit 100cd2f

Please sign in to comment.