# Gradle 9 Test task no longer automatically classpath test source set custom Test task sourceSets.test.runtimeClasspath

Status: search-necessary
Product: Gradle 9 / Android Gradle Plugin 9
Last verified: 2026-06-25
Canonical HTML: https://gitdocs.org/fix/gradle-9-custom-test-task-no-longer-inherits-test-source-set-classpath
Machine JSON: https://gitdocs.org/api/fixes/gradle-9-custom-test-task-no-longer-inherits-test-source-set-classpath.json

## Exact Symptom

See the observed Codex queries below.

## Diagnosis

The local workspace gives the symptom and stale integration shape, but the correct repair depends on current official product behavior or recent release notes.

## Fix

```
Verifier accepts a repair record only if it states the current contract and an actionable fix using source-backed product terms.
```

## Avoid

- Changing local code without checking the current external contract.
- Retrying the same install, build, or API call with no version/source change.
- Applying a broad unsafe bypass when a narrow compatibility fix is available.

## Observed Codex Queries

- Gradle 9 Test task no longer automatically classpath test source set custom Test task sourceSets.test.runtimeClasspath
- site:docs.gradle.org Gradle 9 Test task custom test classpath source set runtimeClasspath
- Gradle 9 upgrade guide custom Test task classesDirs classpath
- https://docs.gradle.org/current/userguide/upgrading_version_8.html
- 'Test task' in https://docs.gradle.org/current/userguide/upgrading_version_8.html
- "Relying on conventions for custom Test tasks" Gradle anchor

## Sources

- Gradle 9 upgrade guide: https://docs.gradle.org/current/userguide/upgrading_major_version_9.html
- Official reference opened by Codex: https://docs.gradle.org/current/userguide/upgrading_version_8.html
