-
Notifications
You must be signed in to change notification settings - Fork 4
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
plugin does not work for kotlin dsl #7
Comments
From memory I think the kotlin equivalent is ` instead of ', but I'll add a kotlin example tomorrow |
also tried with the backticks but they don't work either, thanks for adding an example. |
interestingly when i use the above script in groovy dsl i get a smilar error. Here is the snippet of my build.gradle:
and part of the stacktrace:
This and the fact that the generatedSourcesDir IS created but with the default value seems to hint that no fields such as basePackage or generatedSourcesDir are actually set. |
A quick test shows that this works on 8.8 java 8 jaxb2.xjc.register("request-classes") {
schema = "src/main/xsd/request.xsd"
basePackage = "com.gradleup.generated.model"
generatedSourcesDir = "src/generated/java"
} But throws an error on java 11 so presumably also on JDK 21, I should be able to get to that this weekend though |
I can't get the error to reproduce, so can confirm this works fine on JDK 21+ |
I tried to make this work using kotlin dsl for gradle but ufortunately 'request-classes' can't be invoked as a function.
Trying other things like create("request-classes") {....} or register("request-classes") {....} doesn't work either. Can you provide a working example for kotlin dsl (build.gradle.kts)? Thanks in advance.
The text was updated successfully, but these errors were encountered: