Skip to content

Commit 84d5533

Browse files
authored
Use composition instead of inheritance for extending Gradle plugins (#46888)
1 parent d2a233a commit 84d5533

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

buildSrc/src/main/groovy/org/elasticsearch/gradle/doc/DocsTestPlugin.groovy

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,21 @@ package org.elasticsearch.gradle.doc
2121
import org.elasticsearch.gradle.OS
2222
import org.elasticsearch.gradle.Version
2323
import org.elasticsearch.gradle.VersionProperties
24-
import org.elasticsearch.gradle.test.RestTestPlugin
24+
import org.gradle.api.Plugin
2525
import org.gradle.api.Project
2626
import org.gradle.api.Task
27+
2728
/**
2829
* Sets up tests for documentation.
2930
*/
30-
public class DocsTestPlugin extends RestTestPlugin {
31+
class DocsTestPlugin implements Plugin<Project> {
3132

3233
@Override
33-
public void apply(Project project) {
34+
void apply(Project project) {
3435
project.pluginManager.apply('elasticsearch.testclusters')
3536
project.pluginManager.apply('elasticsearch.standalone-rest-test')
36-
super.apply(project)
37+
project.pluginManager.apply('elasticsearch.rest-test')
38+
3739
String distribution = System.getProperty('tests.distribution', 'default')
3840
// The distribution can be configured with -Dtests.distribution on the command line
3941
project.testClusters.integTest.testDistribution = distribution.toUpperCase()

0 commit comments

Comments
 (0)