android-bankdroid icon indicating copy to clipboard operation
android-bankdroid copied to clipboard

Make crashlytics optional

Open goober opened this issue 9 years ago • 7 comments

Move crashlytics into separate module and wrap it into a logging interface to make it optional.

  • [x] Use Timber for logging
  • [ ] Wrap Fabric Answers into an EventLogger
  • [ ] Fire anonymous events on successfully bank updates and failed updates to track bank usage
  • [ ] Extract Crashlytics Timber Tree to its own module.
  • [ ] Add build parameter to ignore crashlytics module

goober avatar Oct 10 '16 15:10 goober

Maybe using this?

https://github.com/JakeWharton/timber

I've used it and like it, it even comes with custom Android Lint rules!

walles avatar Oct 10 '16 17:10 walles

Looks promising. I will take a look

goober avatar Oct 10 '16 18:10 goober

When this is done, will it be possible to make an android build without crashlytics?

I'm asking because F-Droid needs this to make Bankdroid available in its repository (see #450). Currently they have some hairy sed preprocessing which removes crashlytics from the source before building Bankdroid.

(Bankdroid is a few releases behind on F-Droid and automatic builds of new releases were disabled when crashlytics appeared in Bankdroid. If a crashlytics-free release of Bankdroid would be possible I think the Bankdroid experience would be better for F-Droid users. Probably not many Bankdroid users use F-Droid, but thought I'd mention it anyway :-))

robho avatar Oct 11 '16 19:10 robho

My idea is to move out crashlytics-related code into a new module e.g. logging-crashlytics, load it dynamically through javas ServiceLoader, with a local logging as a fallback. In addition to that I am planning to add a build property to exclude the logging-crashlytics-module when you build the artifacts.

@robho could that be a working solution for you?

goober avatar Oct 11 '16 21:10 goober

Thanks for the clarification. It sounds good to me, but I don't know much about the android build system or F-Droid packaging.

Go for what you're planning and I'll try to understand your changes and see if I can help get the F-Droid builds updated..

robho avatar Oct 12 '16 19:10 robho

Basically you should be able to run ./gradlew assembleRelease -PignoreCrashlytics and bankdroid should be built without a dependency to crashlytics

goober avatar Oct 12 '16 19:10 goober

Any progress concerning Crashlytics? This issue was last updated almost 2 years ago and possibly forgotten about?

IzzySoft avatar Jun 20 '18 19:06 IzzySoft

Ah! I almost forgot about this one – now it's comple… wait:

    compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {
        transitive = true;
    }

So I guess it's rather "wontfix" then? :cry:

IzzySoft avatar Mar 21 '23 19:03 IzzySoft