-
Notifications
You must be signed in to change notification settings - Fork 63
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
Introduce Java module descriptors #243
Comments
@sormuras Thank for the suggestion. Do you have by any chance an example handy how to do that in Gradle. Mind that Java 1.8 is still jqwik's main platform and I'd very much prefer to stick with a single artefact per module. |
Sure. This is all about adding a Would you mind requiring JDK 17 at build time? With If you want to stay on 8 ... there are ways to compile modules here, too. (For example, let Gradle toolchain provide a recent JDK and use it to compile module descriptors, or also make use of https://github.com/moditect/moditect or https://github.com/beryx/badass-jar-plugin#module-infojava-location). |
I guess @marcphilipp could apply some of his Great Gradle-Fu to help us here. 🤓 |
This will require a separate source set or an additional compile task in Gradle. Alternatively, Moditect als has a Gradle plugin. |
(FYI: here's a similar feature request at micronaut-projects/micronaut-core#6395) |
I had a look at the moditect Gradle plugin. 1.0.0 is still a RC and I didn't succeed in making it work for one single module :-( Guess it's too much hassle for me to tackle it in 1.6.0. Looks like a perfect task for the community to pick up. If there only was any ;-) |
@sormuras You probably know if Kotlin modules come with additional challenges? |
I don't know - but if you have drafted some |
Work in progress...
Using @beryx's https://github.com/beryx/badass-jar-plugin and some |
Ready for testing with commit 9c2be82. Released in 1.6.0-SNAPSHOT |
Preparing an integration test module in parallel...
Fixing those exception on-the-fly. |
This is one strange. Any clue?
Never mind. Build was out of sync... |
Part of issue jqwik-team#243
Any idea? Gradle version 7.2. IntelliJ also complains. |
Works on my machine and GH Actions was also fine. According to that |
Integration test works. Done! |
Cheers! Modules, modules, every where! |
Running some smoke-test commands in a workspace of https://github.com/sormuras/jqwik-samples/tree/main/jqwik-starter-bach yields:
Looks good to me. ✅ |
Feature has been released in 1.6.0 |
Automatic Modules
Here's a listing of modules used by project that runs on Java 17 and uses jqwik via JUnit Platform's Launcher module.
Suggested Solution
Define and compile a
module-info.java
for each jqwik module. Package the generatedmodule-info.class
files to eliminate theautomatic
tag and ...Discussion
... commit to jqwik's modular API: namely, its exported packages and possibly provided and/or used services.
Notable benefit: get jqwik's version rendered into stacktraces.
The text was updated successfully, but these errors were encountered: