Last active
February 1, 2016 14:42
-
-
Save frogermcs/4ffe9a41a93b05f9e68f to your computer and use it in GitHub Desktop.
Dagger2Metrics setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.frogermcs.dagger2metrics:dagger2metrics-plugin:0.2' | |
} | |
} | |
apply plugin: 'com.android.application' | |
apply plugin: 'com.frogermcs.dagger2metrics' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dagger2Metrics.WARNING_1_LIMIT_MILLIS // 30ms | |
Dagger2Metrics.WARNING_2_LIMIT_MILLIS // 50ms | |
Dagger2Metrics.WARNING_3_LIMIT_MILLIS // 100ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ExampleApplication extends Application { | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
//Use it only in debug builds | |
if (BuildConfig.DEBUG) { | |
Dagger2Metrics.enableCapturing(this); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment