I have not developed Android for a while and I am trying to do things right with the new features as the Gradle dependencies.
I am wondering what are the best practices when you need to modify one particular dependency for suiting you needs.
For example, let's say we have two libraries that extend the RecyclerView functionality by subclassing the Adapter:
Adapter --> AdapterA
Adapter --> AdapterB
Since Java does not support multiple inheritances, I guess the only way to make both libraries work together would consist on modifying one of them so the subclassing hierarchy looks like this:
Adapter --> AdapterA --> AdapterB
If I am correct and this is the way to go, what would then be the best way of modifying and integrating the library, here are the options I can think of:
- Fork on GitHub and use JitPack to add the forked-modified library
- Add library as a local module to the app and modify source
Please justify or suggest what is better and if there are any other alternatives to achieve this.