Browse Source

OkHttpProfiler

pull/61/merge
Ezerous 6 years ago
parent
commit
531aa22c88
No known key found for this signature in database GPG Key ID: 262B2954BBA319E3
  1. 1
      app/build.gradle
  2. 3
      app/src/main/assets/apache_libraries.html
  3. 4
      app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java

1
app/build.gradle

@ -89,6 +89,7 @@ dependencies {
implementation "ru.noties:markwon:2.0.0" implementation "ru.noties:markwon:2.0.0"
implementation 'net.gotev:uploadservice:3.4.2' implementation 'net.gotev:uploadservice:3.4.2'
implementation 'net.gotev:uploadservice-okhttp:3.4.2' implementation 'net.gotev:uploadservice-okhttp:3.4.2'
debugImplementation 'com.itkacher.okhttpprofiler:okhttpprofiler:1.0.4' //Plugin: https://plugins.jetbrains.com/plugin/11249-okhttp-profiler
} }
apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.gms.google-services'

3
app/src/main/assets/apache_libraries.html

@ -71,6 +71,9 @@
<li> <li>
<h5><a href="https://github.com/ajoberstar/grgit">Grgit</a>&nbsp;v3.0.0 (Copyright ©2018 Andrew Oberstar)</h5> <h5><a href="https://github.com/ajoberstar/grgit">Grgit</a>&nbsp;v3.0.0 (Copyright ©2018 Andrew Oberstar)</h5>
</li> </li>
<li>
<h5><a href=https://github.com/itkacher/OkHttpProfiler">OkHttpProfiler</a>&nbsp;v1.0.4</h5>
</li>
</ul> </ul>

4
app/src/main/java/gr/thmmy/mthmmy/base/BaseApplication.java

@ -16,6 +16,7 @@ import com.franmontiel.persistentcookiejar.PersistentCookieJar;
import com.franmontiel.persistentcookiejar.cache.SetCookieCache; import com.franmontiel.persistentcookiejar.cache.SetCookieCache;
import com.franmontiel.persistentcookiejar.persistence.SharedPrefsCookiePersistor; import com.franmontiel.persistentcookiejar.persistence.SharedPrefsCookiePersistor;
import com.google.firebase.analytics.FirebaseAnalytics; import com.google.firebase.analytics.FirebaseAnalytics;
import com.itkacher.okhttpprofiler.OkHttpProfilerInterceptor;
import com.jakewharton.picasso.OkHttp3Downloader; import com.jakewharton.picasso.OkHttp3Downloader;
import com.mikepenz.fontawesome_typeface_library.FontAwesome; import com.mikepenz.fontawesome_typeface_library.FontAwesome;
import com.mikepenz.iconics.IconicsDrawable; import com.mikepenz.iconics.IconicsDrawable;
@ -125,6 +126,9 @@ public class BaseApplication extends Application {
builder.connectionSpecs(Arrays.asList(legacyTls, ConnectionSpec.CLEARTEXT)); builder.connectionSpecs(Arrays.asList(legacyTls, ConnectionSpec.CLEARTEXT));
} }
if (BuildConfig.DEBUG)
builder.addInterceptor(new OkHttpProfilerInterceptor());
client = builder.build(); client = builder.build();
sessionManager = new SessionManager(client, cookieJar, sharedPrefsCookiePersistor, sharedPrefs, draftsPrefs); sessionManager = new SessionManager(client, cookieJar, sharedPrefsCookiePersistor, sharedPrefs, draftsPrefs);

Loading…
Cancel
Save