groovy
dependencies {
implementation 'com.jakewharton.timber:timber:x.y.z'
}
public class MyLibraryApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
if (BuildConfig.DEBUG) {
Timber.plant(new Timber.DebugTree());
} else {
Timber.plant(new CrashReportingTree());
}
}
public static Timber getTimber() {
return Timber.asTree();
}
}
<application
android:name=".MyLibraryApplication"
...>
...
</application>