slf4android icon indicating copy to clipboard operation
slf4android copied to clipboard

Modularize: separate the core SLF4J binding from the optional handlers

Open azabost opened this issue 9 months ago • 0 comments

The main purpose of this PR is to modularize this library so that the core feature, which is SLF4J binding, can be used without the burden of unnecessary dependencies such as the FileLogHandler and the NotifyDeveloperHandler.

Here's a summary of the changes:

  • Split app module into: core, handler-file-log, handler-notify-developer
  • Updated README to reflect the changes in modules (e.g. an additional dependency is required to access the FileLogHandler)
  • Added an auxiliary testapp application module that can be used for testing the other modules
  • Updated Gradle and Android Gradle Plugin to the latest versions (8.7 and 8.4.0)
  • Lowered Java sourceCompatibility and targetCompatibility back to 1.8 (my previous PR left them undefined hence they were the same as the configured Java toolchain, which was 17)
  • Removed a few @TargetApi occurrences because they were no longer relevant due to a higher min SDK version
  • To accommodate the module reorganization, I had to make the Disposable interface public and expose a public LoggerConfiguration.registerDisposable method. These changes were required only to let NotifyDeveloperHandler work with as few changes as possible. Not sure if we want to keep that functionality in the long run, but I didn't want to remove it just yet. If we decided to get rid of that handler, we could also remove the new public method and the Disposable interface.

azabost avatar May 03 '24 11:05 azabost