Worth pointing out that almost nothing runs at the G3's native resolution, so pretty much every app icon gets upscaled and looks like shit. Unless you're blind and can't read the text on a 1080p device, there's really almost no benefit to that resolution.
Unless Samsung significantly changes their flagship design (I doubt it, but I haven't been following leaks either) it's still going to feel like a cheap piece of plastic, which is a big nope for me. The M8 is still pretty handily my phone of the year and HTC has already committed to bringing Android L to both the M7 and M8 by Winter (and it'll likely be on all current flagship phones sooner or later) so I don't really see Android versioning as a concern at the moment.
If you're not dying for an upgrade right now, I would recommend waiting until the fall to make a decision, because either something will come out that blows you away, or nothing that excites you comes out but you'll still likely benefit from price cuts to current flagships. If you are dying to upgrade right now, the G3, One M8, and Z2 are all great phones. The S5 isn't bad but I find it hideous to look at and disgusting to hold, and HTC has been better about prompt Android updates as of late than pretty much any other OEM.