melix
05/28/2024, 1:24 PMmelix
05/28/2024, 1:24 PMmelix
05/28/2024, 1:26 PMmanaged-foo
, so that we can derive things in BOMs we generate. This is not possible with stringly-typed dependencies, I think a project designed "for the future" should probably use this instead.melix
05/28/2024, 1:28 PMmicronaut { ... }
block where users can configure things, and plugins for various kinds of components we produce. For example we have an application
plugin, but also a library
one. In addition, we have companion plugins which can be combined to enable/disable features. For example, the application
plugin actually composes the "minimal" application plugin with the "docker" and "graalvm" plugins, so that users can build an app, compile it as a native binary then deploy as a docker container. But a user may choose to use the minimal plugins if they don't need such features.melix
05/28/2024, 1:30 PMmicronaut
extension, but not the graalvm
one, so ideally, despite the fact that the graalvm
plugin is applied, the extension created by this plugin should be hidden.melix
05/28/2024, 1:30 PMmelix
05/28/2024, 1:33 PMmicronautBuild
extension
⢠our "user facing" plugins, for developers who build apps with Micronaut. These are the ones I described above.
In both cases, I think these are good fit if you want to face some real world use cases, like conventions to collect project dependencies so that the BOM module doesn't have to declare explicitly dependencies on all projects, etc.melix
05/28/2024, 1:34 PMSterling
my first thought was "the dependency declarations should probably use version catalogs and not strings".This is still an open area to investigate. We're intentionally avoiding any existing project extension right now. There's some overlap with version catalogs and how the declarative files work that may change how version catalogs are incorporated. A simple way to update/add dependencies is a must still.
in other words, today it's fairly simple for plugin authors to compose on top of other plugins, but it's more complicated to restrict the set of features they expose to these we want to support.The way we're thinking this would work is you'd naturally get what you want. We have "software types" (this the thing you're building) and then some kind of mix-in to extend those software types. Let's say there's a
micronautLibrary
and micronautApplication
and you can mix-in graalvm
as an optional thing.
In a build file, you can only access the software types, so a project building a micronautLibrary with graalvm could look like:
micronautLibrary {
graalvm {
// graal specific configuration
}
}
This would imply the Micronaut library plugin would be applied as well as the graalvm companion plugin. None of the project extensions would be accessible from the build file, but they'd still be available through build logic.