pgjdbc-ng
pgjdbc-ng copied to clipboard
Add module descriptors inside multi-release jar (#464)
Fixes #464 . Per my comment on that issue, I've proceeded with my assumption that the driver's public API consists of the api and jdbc packages and sub-packages. If that's not the case, let me know and I will modify the module metadata accordingly.
As this PR raises the build-time JDK requirement to Java 11, I've added the --release flag to ensure compatibility. The release flag is like Animal-Sniffer, but better. It prevents you from calling Java 11 methods allowing you to remain Java 8-compatible – it even handles covariant return types.
Because of the JDK 11 build-time requirement, I've updated the Github workflow as well.
Would you like an integration test to verify the contents of META-INF/services/ match up with the provides directives in the module descriptor?
@A248 Can you check the build error? It doesn't seem to build at all on CI.
@A248 Can you check the build error? It doesn't seem to build at all on CI.
I see it now. However, I tried and failed to reproduce the failure locally. Both gradle classes and gradle clean classes succeed for me without issue – these task runs also create the driver and spy jars.
I'd have to guess it relates to Gradle's caching mechanisms, so I've added a temporary commit to check that, which I'll revert later. The workflow run needs your approval, though.
@kdubb I came back to this and tackled the build failure. I managed to reproduce the compilation failure and solve the issue.
Let me know if there are any other changes I need to make.