@@ -86,27 +86,21 @@ public class RestResourcesPlugin implements Plugin<Project> {
8686 public void apply (Project project ) {
8787 RestResourcesExtension extension = project .getExtensions ().create (EXTENSION_NAME , RestResourcesExtension .class );
8888
89- // tests
9089 Provider <CopyRestTestsTask > copyRestYamlTestTask = project .getTasks ()
9190 .register ("copyYamlTestsTask" , CopyRestTestsTask .class , task -> {
9291 task .includeCore .set (extension .restTests .getIncludeCore ());
9392 task .includeXpack .set (extension .restTests .getIncludeXpack ());
94- task .coreConfig = project .getConfigurations ().maybeCreate ( "restTests " );
93+ task .coreConfig = project .getConfigurations ().create ( "restTest " );
9594 if (BuildParams .isInternal ()) {
96- // core
9795 Dependency restTestdependency = project .getDependencies ()
9896 .project (Map .of ("path" , ":rest-api-spec" , "configuration" , "restTests" ));
9997 project .getDependencies ().add (task .coreConfig .getName (), restTestdependency );
100- // x-pack
101- task .xpackConfig = project .getConfigurations ().maybeCreate ( "restXpackTests " );
98+
99+ task .xpackConfig = project .getConfigurations ().create ( "restXpackTest " );
102100 Dependency restXPackTestdependency = project .getDependencies ()
103101 .project (Map .of ("path" , ":x-pack:plugin" , "configuration" , "restXpackTests" ));
104102 project .getDependencies ().add (task .xpackConfig .getName (), restXPackTestdependency );
105103 task .dependsOn (task .xpackConfig );
106- // watcher
107- Dependency restWatcherTests = project .getDependencies ()
108- .project (Map .of ("path" , ":x-pack:plugin:watcher:qa:rest" , "configuration" , "restXpackTests" ));
109- project .getDependencies ().add (task .xpackConfig .getName (), restWatcherTests );
110104 } else {
111105 Dependency dependency = project .getDependencies ()
112106 .create ("org.elasticsearch:rest-api-spec:" + VersionProperties .getElasticsearch ());
@@ -115,19 +109,18 @@ public void apply(Project project) {
115109 task .dependsOn (task .coreConfig );
116110 });
117111
118- // api
119112 Provider <CopyRestApiTask > copyRestYamlSpecTask = project .getTasks ()
120113 .register ("copyRestApiSpecsTask" , CopyRestApiTask .class , task -> {
121114 task .includeCore .set (extension .restApi .getIncludeCore ());
122115 task .includeXpack .set (extension .restApi .getIncludeXpack ());
123116 task .dependsOn (copyRestYamlTestTask );
124- task .coreConfig = project .getConfigurations ().maybeCreate ( "restSpecs " );
117+ task .coreConfig = project .getConfigurations ().create ( "restSpec " );
125118 if (BuildParams .isInternal ()) {
126119 Dependency restSpecDependency = project .getDependencies ()
127120 .project (Map .of ("path" , ":rest-api-spec" , "configuration" , "restSpecs" ));
128121 project .getDependencies ().add (task .coreConfig .getName (), restSpecDependency );
129122
130- task .xpackConfig = project .getConfigurations ().maybeCreate ( "restXpackSpecs " );
123+ task .xpackConfig = project .getConfigurations ().create ( "restXpackSpec " );
131124 Dependency restXpackSpecDependency = project .getDependencies ()
132125 .project (Map .of ("path" , ":x-pack:plugin" , "configuration" , "restXpackSpecs" ));
133126 project .getDependencies ().add (task .xpackConfig .getName (), restXpackSpecDependency );
0 commit comments