Skip to content

Commit c1b5ef3

Browse files
authored
Use resolvable configuration testRuntimeClasspath instead of non-resolvable testImplementation (#1001)
1 parent d44665c commit c1b5ef3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/docs/custom-tasks/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
1212
task testJar(type: ShadowJar) {
1313
archiveClassifier.set("tests")
1414
from sourceSets.test.output
15-
configurations = [project.configurations.testImplementation]
15+
configurations = [project.configurations.testRuntimeClasspath]
1616
}
1717
```
1818

19-
The code snippet above will generate a shadowed JAR containing both the `main` and `test` sources as well as all `runtime`
19+
The code snippet above will generate a shadowed JAR containing both the `main` and `test` sources as well as all `testRuntimeOnly`
2020
and `testImplementation` dependencies.
2121
The file is output to `build/libs/<project>-<version>-tests.jar`.
2222

0 commit comments

Comments
 (0)