wsdl2java-gradle-plugin
wsdl2java-gradle-plugin copied to clipboard
#8 Support multiple binding files
I've switched to FileCollection
for the extension/task property and added a convenience method to the extension so users won't necessarily have to deal with the FileCollection.from()
syntax.
This appeared to me as the most "natural" approach, opposed to having a ListProperty<File>
(inconsistent with the other properties) oder even ListProperty<RegularFile>
(a bit painful to handle, layout.file()
syntax being not commonly known/understood by users).
~~ One thing where I wasn't 100% sure was how to configure the FileCollection
task property from the extension property. Here the convention approach is not available and there aren't any super clear docs/examples how to do this. But it seems to work alright the way it's done here. ~~
Edit: after being a bit more versed in the approach to lazy configuration of gradle tasks, I'd argue that the approach taken in the plugin is not 100% idiomatic. Typically one would not refer to the extension properties in the task implementation. Rather there the task properties should be "unbiased" and preferable empty, except obvious defaults. The plugin implementation should instead be responsible of connecting the extension properties to the task properties.
However, in this PR I've gone along with the approach taken here.
Hello, bumping because I'm interested in seeing this PR merged and need multiple binding files with this plugin. Are there updates on this?