-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Java modules #1309
Conversation
aaa5ac1
to
a312558
Compare
a312558
to
b79a1a4
Compare
Hi, I would like to merge this, but from what I see this is a breaking change - slf4j api requires java 8 after version 2.0.0 and the new build process requires at least java 9. @marci4 what are your thoughts on this? If modules and slf4j-api are the only thing we need from java 9, and codebase remains java 7 compatible, maybe it makes sense to build two jars and release the new one under different name. |
@PhilipRoman java 7 is only needed for android, but as far as I know these versions are still supported by google (they have at least access to the playstore) so I dont think we can drop this support. We had a lot of problems when we used a java 7 api (https://github.com/TooTallNate/Java-WebSocket/wiki/No-such-method-error-setEndpointIdentificationAlgorithm) so... |
Hi, thanks for considering this.
Good point, I've updated
Unless I'm missing something, it's merely a build-breaking change under specific conditions: if a project X depends on Java-WebSocket, and X requires Java SE 7 compatibility, and its build tool determines the version of If I'm missing something, please elaborate on your concerns.
The JAR as built will work correctly on any Java SE 7+ JVM, on 1 condition: Java-WebSocket must only use slf4j APIs which are available in both versions 1.7.25 and 2.0.6. But this is unlikely to ever be an issue as the project only uses a minimal number of essential slf4j methods. On a final note: |
sounds good
That's not a problem. I usually use Gradle for building but that's only because of some extra scripts I have I want to do some more tests before merging, in particular to verify that cross compiling doesn't introduce the dreaded ByteBuffer ABI incompatibility. |
Looks like CI is failing
|
@PhilipRoman my bad. The docs also have a |
Thanks for adding it, I have no idea how Github CI works 😆 |
Description
Add support for Java modules. The slf4j-api dependency was also updated to use a modularized version.
Related Issue
Fixes #1308
Motivation and Context
It allows projects that depend on this project to be modularized as well. And it allows encapsulating packages (such as the
utils
package).How Has This Been Tested?
Building the project and verifying that the created JAR is now modular with
jar -d -f .\Java-WebSocket-1.5.4-SNAPSHOT.jar --release 9
Types of changes
Checklist: