aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/FrostApp.kt
blob: 0fb4e7dbfd5f014709976890fdc7a3e5ea89cd35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package com.pitchedapps.frost

import android.app.Application
import com.pitchedapps.frost.facebook.retro.FrostApi
import com.pitchedapps.frost.facebook.retro.IFrost
import com.pitchedapps.frost.utils.CrashReportingTree
import com.pitchedapps.frost.utils.Prefs
import io.realm.Realm
import timber.log.Timber
import timber.log.Timber.DebugTree


/**
 * Created by Allan Wang on 2017-05-28.
 */
class FrostApp : Application() {

    override fun onCreate() {
        if (BuildConfig.DEBUG) Timber.plant(DebugTree())
        else Timber.plant(CrashReportingTree())
        Prefs(applicationContext)
        FrostApi(applicationContext)
        Realm.init(applicationContext)
        super.onCreate()
    }
}