0

There is one behavior of an open source library that I would like to change (in FirebaseAuth).

But I would like to avoid the burden of cloning the library and using my version. So I'm wondering if there is an easier way, something like telling gradle to pull the project locally and use it, that way I could modify a simple file and only maintain that.

That's what my colleague is able to do on iOS with the POD management. Just wondering if you guys have ideas about this

I tried to check if there was a way to override the class or the code but it doesn't seems to be possible. It seems to work only for ressources.

  • Are you looking to keep a "modified jar" somewhere in your source tree? If so, you can use `flatDir` as a repository. More here: https://stackoverflow.com/questions/61797206/gradle-build-using-plugins-and-dependencies-from-flatdir – User51 Mar 09 '23 at 14:17

1 Answers1

0

You can override any code using reflections. Here is a link to the official documentation: https://kotlinlang.org/docs/reflection.html

Be aware that using reflections should be used as last resort and you have to make sure that you don't break any code depending on the part you change.

Crainko
  • 41
  • 3