Replies: 1 comment 6 replies
-
That's an interesting idea with great potential. How would it work though for extensions that aren't direct dependencies of the application module. AFAICS, it's not that uncommon to have a module (including an external one), that depends on Quarkus extensions, as a direct (or even a transitive dependency) of the application module. Would then |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
At the moment, the Gradle plugin uses a projects's normal
compileClasspath
Configuration to ascertain the Quarkus extensions used by the project explicitly, implicitly and conditionally by scanning. So the project'scompileClasspath
Configuration will include:This approach has some drawbacks, 2 main ones:
compileClasspath
, we need to be able to look at the dependency's jar file to determine whether it is an extension; e.g. a dependency on JUnit is not an extension but we'd still have to resolve that dependency (its resolved as part of the Configuration) to know that.The important aspect here is to be able to handle the different categorizations specially. In my original poc work, I used DSL to drive this separation. That is definitely a larger usage deviation from the current approach. A smaller move might be to use dedicated Configurations for the 2 we want to handle specially:
In terms of compatibility, we can even introduce an option:
This compatibility option could also be used in conjunction with the DSL-approach (like in my poc).
Distinguishing these categorizations allows us to minimize the amount of work needed up front to figure out the extensions to apply because we can limit the number of dependencies we need to resolve to determine the full extension set.
Aside from the DSL aspect, this is also another difference between the
quarkusExtensions
approach and the "poc approach". The poc creates a Configuration for each extension (it aggregates them via extends into something likequarkusExtensions
). Which allows for even more control (e.g. create the Configuration for conditional dependencies, but don't resolve it yet).Beta Was this translation helpful? Give feedback.
All reactions