-
Notifications
You must be signed in to change notification settings - Fork 18
Add a source directory for generated files #10
Conversation
You seem to be doing several things at once here that don't fully make sense to me. I don't think it's right to declare an |
https://paste.gg/p/anonymous/b15485380a4d443e88b257d00c7bb414 This is the issue I have been having, not sure exactly what causes it, but when running I do have an ugly workaround, which is just configuring the yml generation task with I came to this solution after noticing that the SpongeGradle plugin-development plugin, which generates a single json file in a similar way to plugin-yml, does not have this issue, and saw this is how they were including their generated files. |
Hm. I tried for many, many times (with your projects) but I didn't manage to reproduce this for some reason... I wonder if this is related to issue 2488 on https://github.com/gradle/gradle (don't want a backlink here), but you don't seem to have any dependencies on the clean task either. |
Tested on my laptop with macOS, and can't reproduce there, but happens consistently on my Arch Linux system. |
Also happens consistently for me with those projects and my own on Void Linux |
I'm not entirely sure why Gradle does this, but FS ops can be strange at times. The reasoning behind OutputDirectory in SG iirc was originally because a SpongeGradle's current implementation was last tweaked to comply with Gradle 7's implicit dependency validation, which it looks like jmp's solution here is also compliant with. |
Weird, I'm also testing on Arch Linux and cannot reproduce this. :( |
The input for
I'm not sure I understand this correctly, what does this mean? When setting up an IDE run configuration, your approach adds it to the runtime classpath and mine doesn't?
plugin-yml works fine on Gradle 7 since the last update, so I think my approach also passes the validation? Anyway, I'm not opposed to change it to an output directory if that provides actual advantages (like the IDE stuff you mentioned?). As I mentioned in my first comment, my main concern with the changes in this PR as-is is that it changes several things at once that are not strictly related to each other, so it's not entirely clear why it actually fixes that issue with the clean task. I suspect the cause of the problems with the clean task is the use of If there is really an advantage of adding a directory to |
resources using processResources This allows for IDEs to recognize the generated resources. This also fixes an issue where sometimes running `clean build` would cause 'java.io.IOException: Unable to delete directory', although this fix may also be due to the new approach no longer creating a temporary directory.
@zml2008 Still kind of curious about the advantage of doing |
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Fixes an issue where when attempting to
clean build
, sometimesjava.io.IOException: Unable to delete directory
would fail the build.