Skip to content

Commit

Permalink
Add dependsOn to ensure task ordering in samples (gradle#30687)
Browse files Browse the repository at this point in the history
  • Loading branch information
jvandort authored Sep 24, 2024
2 parents 22904d9 + 46b5a82 commit 3b799db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ tasks.register("resolveConfiguration", ResolveFiles) {
files.from(configurations.runtimeClasspath)
}
tasks.register("resolveIncomingFiles", ResolveFiles) {
// end::implicit-file-resolution[]
dependsOn(tasks.named("resolveConfiguration")) // To preserve output ordering
// tag::implicit-file-resolution[]
files.from(configurations.runtimeClasspath.incoming.files)
}
// end::implicit-file-resolution[]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ tasks.register<ResolveFiles>("resolveConfiguration") {
files.from(configurations.runtimeClasspath)
}
tasks.register<ResolveFiles>("resolveIncomingFiles") {
// end::implicit-file-resolution[]
dependsOn(tasks.named("resolveConfiguration")) // To preserve output ordering
// tag::implicit-file-resolution[]
files.from(configurations.runtimeClasspath.map { it.incoming.files })
}
// end::implicit-file-resolution[]
Expand Down

0 comments on commit 3b799db

Please sign in to comment.