I’m trying to create a plugin to set native compiler settings in a way that could be applied across all projects. I’ve reviewed the documentation and video for rule based model configuration. I have hit an error that I am unable to resolve. The plugin compiled successfully but when it is applied in a project I get the error:
There is a problem with model rule NativeProjectPlugin.OptionRules#setOptions.
Type-only model reference of type org.gradle.model.ModelMap<org.gradle.nativeplatform.NativeBinarySpec> (parameter 1) is ambiguous as multiple model elements are available for this type:
- binaries (created by: BinaryBasePlugin.Rules#binaries)
- components (created by: ComponentBasePlugin.PluginRules#components)
Error comes from here:
@Mutate void setOptions(ModelMap<NativeBinarySpec> binaries, ModelMap<CompilerOptions> compilerOptions, ModelMap<LinkerOptions> linkerOptions, ModelMap<ResourceOptions> resourceOptions)
I tried various different native objects and containers and also @Path and could not get it to work. Is this something that is even possible?