RFR: Touch up gradle build
I'm setting up the jextract repo on a new machine, and ran into a couple of small build issues that this PR addresses: 1.) intellij will try to collect all tasks defined by the gradle build, but this is currently failing if you don't have the jacoco agent configured, since that's needed to 'configure' one of the test tasks. The fix I added is to only lazily register the test task for coverage instead. 2.) If you want to debug a jtreg test through Intellij, it's nice to be able to build the test image and native test libraries as a pre-run step. I've added a new task called `testDeps` which does both of these things, and can be easily referenced from a run configuration. ------------- Commit messages: - Touch up build file Changes: https://git.openjdk.org/jextract/pull/263/files Webrev: https://webrevs.openjdk.org/?repo=jextract&pr=263&range=00 Stats: 19 lines in 1 file changed: 9 ins; 5 del; 5 mod Patch: https://git.openjdk.org/jextract/pull/263.diff Fetch: git fetch https://git.openjdk.org/jextract.git pull/263/head:pull/263 PR: https://git.openjdk.org/jextract/pull/263
On Wed, 11 Dec 2024 18:26:33 GMT, Jorn Vernee <jvernee@openjdk.org> wrote:
I'm setting up the jextract repo on a new machine, and ran into a couple of small build issues that this PR addresses:
1.) intellij will try to collect all tasks defined by the gradle build, but this is currently failing if you don't have the jacoco agent configured, since that's needed to 'configure' one of the test tasks. The fix I added is to only lazily register the test task for coverage instead.
2.) If you want to debug a jtreg test through Intellij, it's nice to be able to build the test image and native test libraries as a pre-run step. I've added a new task called `testDeps` which does both of these things, and can be easily referenced from a run configuration.
FWIW, I also took a look at the failing github actions. The issue is that both the toolchain JDK 22, and the gradle JDK 17, are no longer available. Bumping the versions is easy enough, but we also need to update the gradle version we use in that case. Will save that for another PR. ------------- PR Comment: https://git.openjdk.org/jextract/pull/263#issuecomment-2539505574
On Wed, 11 Dec 2024 18:26:33 GMT, Jorn Vernee <jvernee@openjdk.org> wrote:
I'm setting up the jextract repo on a new machine, and ran into a couple of small build issues that this PR addresses:
1.) intellij will try to collect all tasks defined by the gradle build, but this is currently failing if you don't have the jacoco agent configured, since that's needed to 'configure' one of the test tasks. The fix I added is to only lazily register the test task for coverage instead.
2.) If you want to debug a jtreg test through Intellij, it's nice to be able to build the test image and native test libraries as a pre-run step. I've added a new task called `testDeps` which does both of these things, and can be easily referenced from a run configuration.
Marked as reviewed by mcimadamore (Reviewer). ------------- PR Review: https://git.openjdk.org/jextract/pull/263#pullrequestreview-2501882033
On Wed, 11 Dec 2024 18:26:33 GMT, Jorn Vernee <jvernee@openjdk.org> wrote:
I'm setting up the jextract repo on a new machine, and ran into a couple of small build issues that this PR addresses:
1.) intellij will try to collect all tasks defined by the gradle build, but this is currently failing if you don't have the jacoco agent configured, since that's needed to 'configure' one of the test tasks. The fix I added is to only lazily register the test task for coverage instead.
2.) If you want to debug a jtreg test through Intellij, it's nice to be able to build the test image and native test libraries as a pre-run step. I've added a new task called `testDeps` which does both of these things, and can be easily referenced from a run configuration.
This pull request has now been integrated. Changeset: e870893c Author: Jorn Vernee <jvernee@openjdk.org> URL: https://git.openjdk.org/jextract/commit/e870893cde2f8b7e6e318873c8f49e3ec46e... Stats: 19 lines in 1 file changed: 9 ins; 5 del; 5 mod Touch up gradle build Reviewed-by: mcimadamore ------------- PR: https://git.openjdk.org/jextract/pull/263
participants (2)
-
Jorn Vernee
-
Maurizio Cimadamore