-
Notifications
You must be signed in to change notification settings - Fork 29
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
Sourcesets not correctly set (>0.2.5) #9
Comments
Hey @rnorth 🙂 |
Ah, maybe I've hit an edge case against the new way of doing things then! I'll create an example repository: unfortunately I already have the Thanks for getting back to me quickly! |
Quick repository to demonstrate this: https://github.com/rnorth/jooq-plugin-issue9-repro
I hope this helps - if you spot anything I'm doing wrong please do let me know. |
Thanks for the repo it was helpful 👍 I did some digging and I found what is the problem. Current implementation of the plugin assumes that the Java plugin will be applied before the jooq plugin and seems like it's not the case for this project. What bothers me is that we actually have the test case for Java project compilation here, that passes but when I copy exact same setup as a standalone project it fails the same way your reporo exmple 🤔 I'll do some more digging later maybe I'll be able to reproduce the problem with the test somehow, but anyways I'll fix the problem in the next release. Unfortunately until that you will have to stick to the workaround you proposed or to older version or in the more complex setups with subprojects it seems to work just fine. Thanks for raising the issue and I'll keep you posted here once I fix it 👍 |
@rnorth @victorlopezsalazar should be now fixed in latest |
Great, thanks so much! I’ll give it a try and let you know. |
In my case going from
the config for the task is the following:
worth to mention that I also have the configuration to replace the flyway version enabled:
I will play around with configs later when I got a little time to do it. |
@victorlopezsalazar that's actually to be expected 😅 That's because versions |
I’ve upgraded to 0.3.4 and removed the workarounds, and it seems to work perfectly! Thanks for solving the problem @adrianskrobaczrevolut! |
On a fairly new codebase where I'm using this plugin, I've encountered what seems like a regression in versions greater than 0.2.5.
It would appear that after this version the sourcesets and compileJava dependency on generateJooqClasses are no longer automatically set up correctly: what I've observed is:
generateJooqClasses
not being run at all in a normal build (e.g.clean check
). This can be worked around by addingcompileJava.dependsOn(generateJooqClasses)
to the build script.Following that workaround, it's still not good news:
main
code that depends on any generated classesbuild/generated-jooq
directory as a source directoryI've not had time to dig into why this is happening, but for me both of the following workarounds work:
or
build.gradle
:I can put together a repro example if you'd like, but before I do so, does anything spring to mind?
The text was updated successfully, but these errors were encountered: