package com.xmartlabs.template.module;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

import java.util.Date;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

/**
 * Created by santiago on 23/10/15.
 */
@Module
public class GsonModule {
  @Provides
  @Singleton
  public Gson provideGson() {
    return new GsonBuilder()
        .registerTypeAdapter(Date.class, new GsonUtcDateAdapter())
        .create();
  }
}

@@ -97,16 +97,59 @@
 Builder;
+%0Aimport com.xmartlabs.template.BuildConfig;
 %0A%0Aimport
@@ -386,14 +386,33 @@
     
-return
+GsonBuilder gsonBuilder =
  new
@@ -492,16 +492,116 @@
 apter())
+;%0A%0A    if (BuildConfig.DEBUG) %7B%0A      gsonBuilder.setPrettyPrinting();%0A    %7D%0A%0A    return gsonBuilder
 %0A       

Enable pretty printing of JSON in logs