How do I map a plugin's extension property to a copy task's excludes?

I’m currently working on the Lazybones Gradle plugin. The plugin registers an extension using a custom LazybonesConventions class. I then use convention mappings to map the extension properties to task properties. This was working until I tried to map to a Zip task’s ‘excludes’ property:

def task = project.tasks.create(taskName, Zip)
task.with {"baseName") { tmplName + project.extensions.lazybones.packageNameSuffix }"destinationDir") { project.extensions.lazybones.packagesDir }
      includeEmptyDirs = true
    version = project.file("$tmplDir/VERSION").text.trim()
      from tmplDir"excludes") { project.extensions.lazybones.packageExcludes }

The exclusions don’t appear to work. If I set the ‘excludes’ property to a literal list, those files are excluded as expected. Is there any way to achieve what I want? Is the ‘excludes’ property special in some way such that the convention mapping doesn’t work?

For what it’s worth, it seems in this case I can set the property directly:

excludes = project.extensions.lazybones.packageExcludes

Convention mapping won’t work for ‘excludes’ because it’s not really a property but a method that configures the underlying CopySpec:

Thanks for the quick reply. I suspected as much. Is there a best practice alternative?

Not that I know of, sorry.