Skip to content

Commit 7120c14

Browse files
authored
Avoid eager creation of rest test tasks (#92855) (#92859)
The standard Gradle `withType()` method that takes an action is the "legacy" API which realizes tasks eagerly. To avoid this, we need to explicitly use `configureEach()` to pass our configuration action.
1 parent 68d1337 commit 7120c14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/RestTestBasePlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public void apply(Project project) {
105105

106106
});
107107

108-
project.getTasks().withType(StandaloneRestIntegTestTask.class, task -> {
108+
project.getTasks().withType(StandaloneRestIntegTestTask.class).configureEach(task -> {
109109
SystemPropertyCommandLineArgumentProvider nonInputSystemProperties = task.getExtensions()
110110
.getByType(SystemPropertyCommandLineArgumentProvider.class);
111111

0 commit comments

Comments
 (0)