Skip to content

Commit 69c6a1b

Browse files
committed
Remove duplicate task dependency declaration of test tasks and check
1 parent 18a0b47 commit 69c6a1b

File tree

2 files changed

+0
-21
lines changed

2 files changed

+0
-21
lines changed

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@
1010
package org.elasticsearch.gradle.internal.test.rest;
1111

1212
import org.elasticsearch.gradle.util.GradleUtils;
13-
import org.gradle.api.Action;
1413
import org.gradle.api.Plugin;
1514
import org.gradle.api.Project;
16-
import org.gradle.api.plugins.JavaBasePlugin;
17-
import org.gradle.api.plugins.jvm.JvmTestSuiteTarget;
1815
import org.gradle.api.tasks.SourceSet;
1916
import org.gradle.testing.base.TestingExtension;
2017

@@ -30,7 +27,6 @@ public class InternalJavaRestTestPlugin implements Plugin<Project> {
3027
@Override
3128
public void apply(Project project) {
3229
project.getPluginManager().apply(RestTestBasePlugin.class);
33-
3430
TestingExtension testing = project.getExtensions().getByType(TestingExtension.class);
3531
testing.getSuites().registerBinding(JavaRestTestSuite.class, DefaultJavaRestTestSuite.class);
3632
testing.getSuites().register(SOURCE_SET_NAME, JavaRestTestSuite.class, suite -> {
@@ -39,13 +35,6 @@ public void apply(Project project) {
3935
if (project.findProject(":test:test-clusters") != null) {
4036
suite.getDependencies().getImplementation().add(suite.getDependencies().project(":test:test-clusters"));
4137
}
42-
suite.getTargets()
43-
.all(
44-
(Action<JvmTestSuiteTarget>) jvmTestSuiteTarget -> jvmTestSuiteTarget.getTestTask()
45-
.configure(
46-
test -> project.getTasks().named(JavaBasePlugin.CHECK_TASK_NAME).configure(check -> check.dependsOn(test))
47-
)
48-
);
4938
});
5039

5140
}

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@
1010
package org.elasticsearch.gradle.internal.test.rest;
1111

1212
import org.elasticsearch.gradle.util.GradleUtils;
13-
import org.gradle.api.Action;
1413
import org.gradle.api.Plugin;
1514
import org.gradle.api.Project;
16-
import org.gradle.api.plugins.JavaBasePlugin;
17-
import org.gradle.api.plugins.jvm.JvmTestSuiteTarget;
1815
import org.gradle.api.tasks.SourceSet;
1916
import org.gradle.testing.base.TestingExtension;
2017

@@ -36,13 +33,6 @@ public void apply(Project project) {
3633
testing.getSuites().register(SOURCE_SET_NAME, YamlRestTestSuite.class, suite -> {
3734
suite.useJUnit();
3835
configureYamlSourceSet(project, suite.getSources());
39-
suite.getTargets()
40-
.all(
41-
(Action<JvmTestSuiteTarget>) jvmTestSuiteTarget -> jvmTestSuiteTarget.getTestTask()
42-
.configure(
43-
test -> project.getTasks().named(JavaBasePlugin.CHECK_TASK_NAME).configure(check -> check.dependsOn(test))
44-
)
45-
);
4636
});
4737
}
4838

0 commit comments

Comments
 (0)