Skip to content

Commit

Permalink
Use resolvable configuration testRuntimeClasspath instead of non-reso…
Browse files Browse the repository at this point in the history
…lvable testImplementation (#1001)
  • Loading branch information
quijote authored Oct 15, 2024
1 parent d44665c commit c1b5ef3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/docs/custom-tasks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
task testJar(type: ShadowJar) {
archiveClassifier.set("tests")
from sourceSets.test.output
configurations = [project.configurations.testImplementation]
configurations = [project.configurations.testRuntimeClasspath]
}
```

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

0 comments on commit c1b5ef3

Please sign in to comment.