Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix visibility of generated sources directory to Kotlin compilation #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

f4lco
Copy link

@f4lco f4lco commented Jun 8, 2021

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 as srcDir.
  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant