RFR: Add missing inputs to tasks in gradle build
Maurizio Cimadamore
mcimadamore at openjdk.org
Fri Feb 9 17:04:04 UTC 2024
On Fri, 9 Feb 2024 14:59:53 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
> I recently re-did some of the task dependencies of the gradle build: https://github.com/openjdk/jextract/pull/200
>
> From my initial testing for that PR, and reading online, I was under the impression that tasks would re-run when the outputs of a dependency changes. After additional use & testing, this turns out to be not the case and we need to explicitly set task inputs any way. This PR does that.
>
> I also changed the `copyLibClang` task from `Copy` to `Sync`. If a file is removed from the source directory, `Copy` will not remove it from the output, but `Sync` will. This helps ensure that we don't package any stale files into the jextract jmod (which might create include conflicts). This is also something I noticed during more thorough testing.
>
> Finally, I noticed that on Windows we were copying `clang.exe` to the jextract jmod archive, since we copy from the `bin` dir on Windows, which contains both the `libclang.dll` and the `clang.exe` file. I've added an exclude for `clang.exe`.
I wonder if this is why I didn't see the build failure on incremental rebuild when working onmy previous PR. Thanks for fixing.
-------------
Marked as reviewed by mcimadamore (Reviewer).
PR Review: https://git.openjdk.org/jextract/pull/204#pullrequestreview-1872838809
More information about the jextract-dev
mailing list