Gonçalo's PKGBUILD pulls the develop tarball...
Similarly his git version either pulls the default branch (develop I guess) or has a fixed commit id (pkgver=r3506.693671c629). I'm not 100% sure how makepkg handles git sources.
Changes to OpenPnP happen first on the test branch, so if you want the bleeding edge you'll need a test build. The Java >= 17 support should make it from test into develop soon.
When using AUR it's always a good idea to look at the PKGBUILD and see exactly what you're getting. That's in general, not just OpenPnP.
For OpenPnP it's probably better to get the installers from the website rather than relying on Gonçalo to keep his AUR package up to date, though he's doing a good job on that so far I think.
CU,
Ian