// Path: app/src/main/java/com/jonathanpetitfrere/mvvm/di/AppGraph.java
// public interface AppGraph {
//     //Application
//     void inject(MvvmApplication mvvmApplication);
// 
//     //View Model
//     void inject(MainViewModel mainViewModel);
// }
// 
// Path: app/src/main/java/com/jonathanpetitfrere/mvvm/di/ApplicationModule.java
// @Module
// public class ApplicationModule {
// 
//     private final Application application;
// 
//     public ApplicationModule(Application application) {
//         this.application = application;
//     }
// 
//     @Singleton
//     @Provides
//     Application provideApplication() {
//         return this.application;
//     }
// 
//     @Singleton
//     @Provides
//     Context provideContext() {
//         return this.application;
//     }
// }


import android.app.Application;
import com.facebook.stetho.Stetho;
import com.facebook.stetho.timber.StethoTree;
import com.jonathanpetitfrere.mvvm.di.AppGraph;
import com.jonathanpetitfrere.mvvm.di.ApplicationModule;
import com.jonathanpetitfrere.mvvm.di.DaggerApplicationComponent;
import com.squareup.leakcanary.LeakCanary;
import timber.log.Timber;
package com.jonathanpetitfrere.mvvm;




/**
 * @author jpetit
 */

public class MvvmApplication extends Application {

    protected AppGraph component;

    @Override
    public void onCreate() {
        super.onCreate();
        if (LeakCanary.isInAnalyzerProcess(this)) {
            // This process is dedicated to LeakCanary for heap analysis.
            // You should not init your app in this process.
            return;
        }

        LeakCanary.install(this);
        Stetho.initializeWithDefaults(this);

        if(BuildConfig.DEBUG) {
            Timber.plant(new Timber.DebugTree());
            Timber.plant(new StethoTree());
        }

        component = DaggerApplicationComponent.builder()
// Path: app/src/main/java/com/jonathanpetitfrere/mvvm/di/AppGraph.java
// public interface AppGraph {
//     //Application
//     void inject(MvvmApplication mvvmApplication);
// 
//     //View Model
//     void inject(MainViewModel mainViewModel);
// }
// 
// Path: app/src/main/java/com/jonathanpetitfrere/mvvm/di/ApplicationModule.java
// @Module
// public class ApplicationModule {
// 
//     private final Application application;
// 
//     public ApplicationModule(Application application) {
//         this.application = application;
//     }
// 
//     @Singleton
//     @Provides
//     Application provideApplication() {
//         return this.application;
//     }
// 
//     @Singleton
//     @Provides
//     Context provideContext() {
//         return this.application;
//     }
// }


// Path: app/src/main/java/com/jonathanpetitfrere/mvvm/MvvmApplication.java
import android.app.Application;
import com.facebook.stetho.Stetho;
import com.facebook.stetho.timber.StethoTree;
import com.jonathanpetitfrere.mvvm.di.AppGraph;
import com.jonathanpetitfrere.mvvm.di.ApplicationModule;
import com.jonathanpetitfrere.mvvm.di.DaggerApplicationComponent;
import com.squareup.leakcanary.LeakCanary;
import timber.log.Timber;

package com.jonathanpetitfrere.mvvm;




/**
 * @author jpetit
 */

public class MvvmApplication extends Application {

    protected AppGraph component;

    @Override
    public void onCreate() {
        super.onCreate();
        if (LeakCanary.isInAnalyzerProcess(this)) {
            // This process is dedicated to LeakCanary for heap analysis.
            // You should not init your app in this process.
            return;
        }

        LeakCanary.install(this);
        Stetho.initializeWithDefaults(this);

        if(BuildConfig.DEBUG) {
            Timber.plant(new Timber.DebugTree());
            Timber.plant(new StethoTree());
        }

        component = DaggerApplicationComponent.builder()
                .applicationModule(new ApplicationModule(this))