This message was deleted.
# community-support
s
This message was deleted.
e
I have written in a couple of projects
Copy code
tasks.test {
    // Re-use downloaded artifacts to speed up test times
    environment("GRADLE_RO_DEP_CACHE", File(gradle.gradleUserHomeDir, "caches"))
}
which is not entirely what you asked for, but sharing the parent's dependency cache with the child does help with build times
a
clever idea
it doesn't seem to help much locally though
1.
./gradlew clean
2.
./gradlew check
- 2 minutes 3. add
Copy code
tasks.withType<Test>().configureEach {
      // Help speed up TestKit tests by re-using     dependencies cache (this really helps GitHub Workflows)
      // <https://docs.gradle.org/current/userguide/dependency_resolution.html#sub:shared-readonly-cache>
      environment("GRADLE_RO_DEP_CACHE", gradle.gradleUserHomeDir.resolve("caches"))
    }
4)
./gradlew clean
5)
./gradlew check
- 2 minutes 6)
./gradlew check
- 30 seconds