This is first time when I want to involve into fixing third-party open-source library. Library is hosted on github, so I made a fork of this lib, I cloned my fork to my computer and created feature branch for this fix (To do single commit merge afterwards) This is not a problem.
The problem is time after I do the fix and before library author publishes fix to maven repository. I would like to use this library in my project as fast as I fix this particular bug. I am currently only one person working on a project (this is my pet project, really). But this is a matter of time until I will get into such trouble with my commercial work where I am not the only guy working on project.
I see four resolutions of this problem:
Publish it to local maven repo
Configure local dependency in gradle
Publish to public maven
Private Maven hosted on my VPS
How would you do it? Is any of my approaches right, or I should take whole different approach?
Definitely option 4: "Private Maven hosted on my VPS".
Setting up a private repository manager is actually not that difficult. There are a couple of open-source repository manager, like Artifactory, Nexus or Archiva. I personnally have always used Artifactory so I can't speak for the others, but there is a very good official guide for Artifactory that explains very well how to set it up and configure it.
Note that using a private repository manager has also a lot of other advantages:
So, not only is using a repository manager a good idea for your current problem, it might also solve a lot of your future problems.
Plus, as you said, the other options are very fragile, for the exact reasons you mentioned.