-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Support for dev-mode-only conditional dependencies #44424
base: main
Are you sure you want to change the base?
Conversation
@aloubyansky can you show an example on how an extension will pull in it's own dev ui (runtime json-rpc services) ? |
For now this is limited to extension dependencies. Today applications could add an optional or provided dependency to make it available in dev mode but not in prod. It would be present in test mode too though. |
Oh, sorry, I'm waking up :) |
Here is a very simple example https://github.com/aloubyansky/playground/tree/dev-mode-conditional-deps
The application can be launched in dev mode with |
Nice. Haven't tried it yet but just curious - does the sbom generation captures this already or would that require more changes ?
|
Gradle will need a minor adjustment. Otherwise it should work. |
7fc0c6c
to
a64d19c
Compare
🎊 PR Preview 0d1aa9a has been successfully built and deployed to https://quarkus-pr-main-44424-preview.surge.sh/version/main/guides/
|
The implementation and docs are done. I'm looking to add a test for Gradle. |
a64d19c
to
de4a697
Compare
de4a697
to
66bda69
Compare
This change introduces support for extension conditional dependencies that include dev mode as one of the conditions to enable a dependency.
The simplest form of a conditional dependency would be one extension declaring a dev mode conditional dependency on another extension w/o further conditions, i.e. dev mode will be the only condition. For example
An extension that is configured with the above
quarkus-extension-maven-plugin
configuration will declared a dev-mode-only dependency on extensionquarkus-blue
.quarkus-blue
will be a regular extension, it will not have to configure anything on its side.If an extension declaring a dev mode dependency on
quarkus-blue
also needs a compile time dependency onquarkus-blue
, it can add an optional or provided dependency onquarkus-blue
.@phillip-kruger does this look Ok to you? I haven't added the docs yet, otherwise, it should be usable.