-
Notifications
You must be signed in to change notification settings - Fork 13
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
[Jandex plugin] processJandexIndex delete resources from build dir #63
Comments
Unfortunately, there's no clear way of adding generated index into In Gradle, See gradle/gradle#12774 (comment) So the workaround is to add the file into On the other hand, it might be slightly better to avoid copying the index into WDYT? |
I had a similar idea, modifiy the jar task to include the index, but that does bring the drawback you mentioned. Modifying the processResources task doesn't work because it runs too early. |
Would adding the "build/jandex/jandexMain" dir as a resource dir to the source set solve the testing issue? |
If The drawback would be it might trigger re-execution of |
The issue is that Gradle assumes all resource directories are inputs for |
Are you sure about that? I don't think |
I have not tried that. |
I have turned off the |
I also have to contradict the statement that messing around with another tasks output may be acceptable. Newer gradle versions specifically enforce getting rid of such behavior up to the point the plugin won't work anymore. It also destroys the whole build avoidance gradle is so proud of. Currently I think the best option is to customize the If you need the index in your tests add the output folder of the |
I have have custom resources that get generated during the build process. The standard "processResources"-Task copies them to "build/resources/main". Then later when the "processJandexIndex" task runs, it flags these resources as stale and deletes them.
Also having a task (processJandexIndex) using the same output directory as another task (processResources) is probably not a good idea at all.
The text was updated successfully, but these errors were encountered: