-
I would like to provide a ConfigMapping only if a certain BuildStep is applied. @ConfigMapping(prefix = "my.configs")
@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED)
interface MyConfig{
String property1();
} Having it defined in the runtimes module, this results in this config mapping always being registered and loaded , demanding for the defined property. This property now is feature dependent. If capability A is available during a BuildStep, I would like to add this ConfigMapping to the index. If capability A is not present I will not. I was looking for a fitting BuildItem to provide a ConfigMapping but couldn't find anything fitting. Can I add a ConfigMapping manually during a BuildStep? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
/cc @radcortez (config) |
Beta Was this translation helpful? Give feedback.
No, currently, there is no way to pick extension mappings selectively. It is possible with application mappings with
@IfBuildProfile
/@IfBuildProperty
.An alternative could be to map the feature dependent configuration as
Optionals
.