wsdl2java-gradle-plugin
wsdl2java-gradle-plugin copied to clipboard
Fix visibility of generated sources directory to Kotlin compilation
You've created a nice plugin, thank you for your efforts. I've been trying to use the generated Java sources from Kotlin. The Kotlin compiler did not see the generated sources directory and threw a lot of compilation errors at me. That's when I discovered that the logic of registering the generated sources directory is inside-out:
-
Previously, adding the directory was located inside the lazy configuration of
Wsdl2JavaTask
. To my insight, if Gradle did not configure the task, the plugin did not add the generated sources assrcDir
. -
Now adding the generated sources as source directory happens in all cases independent of running the task's configuration closure. The set of source directories will always contain the property
sourcesOutputDir
of the plugin.
The new way also causes the Kotlin compiler to recognize the generated sources directory as input and I compiled happily thereafter. I'd be glad if you could integrate the patch and drop a new release.