Commit 0afba30
fix(smoke-tests): share debugger test helpers via java-test-fixtures
Gradle 9.5 added a `DependencyHandler.project(String)` overload that
returns a `ProjectDependency`. Inside a `dependencies { }` block, that
overload now shadows the `Project.project(String)` accessor that
previously resolved via Groovy fallback. Result:
`project(':foo').sourceSets` no longer reaches the producing project's
source sets — it hits a `DefaultProjectDependency` and fails with
"unknown property 'sourceSets'".
`dd-smoke-tests/debugger-integration-tests/build.gradle:21` used
`project(':dd-java-agent:agent-debugger').sourceSets.test.output` to
pull two helper classes (`LogProbeTestHelper`, `MoshiSnapshotTestHelper`)
from `agent-debugger`'s test sources.
Apply the canonical Gradle 9.5 fix (see #11367): expose the helpers via
the `java-test-fixtures` plugin on `agent-debugger`. The helpers move
from `src/test/java/com/datadog/debugger/util/` to
`src/testFixtures/java/com/datadog/debugger/util/` (same package), and
the consumer pulls them in via
`testImplementation testFixtures(project(':dd-java-agent:agent-debugger'))`.
The 15 existing in-project consumers (test classes inside agent-debugger)
keep working because the testFixtures source set is automatically on the
`test` source set's classpath.
This unblocks running the root build on Gradle 9.5.1.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 47da748 commit 0afba30
4 files changed
Lines changed: 11 additions & 2 deletions
File tree
- dd-java-agent/agent-debugger
- src/testFixtures/java/com/datadog/debugger/util
- dd-smoke-tests/debugger-integration-tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
50 | 59 | | |
51 | 60 | | |
52 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments