Does Hubitat support groovy.transform.NamedVariant?

Does groovy on Hubitat support the NamedVariant transform? If not, is it just blocked and can it be added / whitelisted? I don't seem to be able to add it using . . .

import groovy.transform.NamedVariant

It would make it much easier to write functions with named parameters in addition to positional. For those interested, here is a description of its use: Groovy Goodness: Creating Extra Method Supporting Named Arguments Using @NamedVariant Annotation - Messages from mrhaki

1 Like

This transform was introduced in Groovy 2.5, so you won't be able to use it in Hubitat, which currently (and has always) used Groovy 2.4.x. I'm guessing they have reasons for keeping that, so that's another story but one I wouldn't know about. :slight_smile:

Thanks for that explanation. I hear the next after the next after the next version of Groovy 4.0 is way faster and stops all code bugs, so they'll probably just jump to that anyway.