Browse Source

Cleanup QA projects build scripts (#74428)

Aiming for configuring less during the build,
this removes non required configuration from qa build scripts that do not
contain any sources. We also remove a few non required afterEvaluate hooks
Rene Groeschke 4 năm trước cách đây
mục cha
commit
b79dd52c1b

+ 6 - 8
plugins/examples/build.gradle

@@ -1,15 +1,13 @@
 import org.elasticsearch.gradle.internal.info.BuildParams
 // Subprojects aren't published so do not assemble
-gradle.projectsEvaluated {
-  subprojects {
-    project.tasks.matching { it.name.equals('assemble') }.configureEach {
+subprojects {
+  project.tasks.matching { it.name.equals('assemble') }.configureEach {
+    enabled = false
+  }
+  if (BuildParams.inFipsJvm) {
+    project.tasks.configureEach {
       enabled = false
     }
-    if (BuildParams.inFipsJvm) {
-      project.tasks.configureEach {
-        enabled = false
-      }
-    }
   }
 }
 

+ 0 - 8
x-pack/plugin/async-search/qa/build.gradle

@@ -1,8 +0,0 @@
-import org.elasticsearch.gradle.internal.test.RestIntegTestTask
-
-apply plugin: 'elasticsearch.build'
-tasks.named("test").configure { enabled = false }
-
-dependencies {
-  api project(':test:framework')
-}

+ 1 - 1
x-pack/plugin/async-search/qa/security/build.gradle

@@ -3,7 +3,7 @@ apply plugin: 'elasticsearch.java-rest-test'
 dependencies {
   javaRestTestImplementation(testArtifact(project(xpackModule('core'))))
   javaRestTestImplementation project(xpackModule('async-search'))
-  javaRestTestImplementation project(':x-pack:plugin:async-search:qa')
+  javaRestTestImplementation project(':test:framework')
 }
 
 testClusters.all {

+ 0 - 6
x-pack/plugin/autoscaling/qa/build.gradle

@@ -1,6 +0,0 @@
-apply plugin: 'elasticsearch.build'
-tasks.named("test").configure { enabled = false }
-
-dependencies {
-  api project(':test:framework')
-}

+ 0 - 8
x-pack/plugin/enrich/qa/build.gradle

@@ -1,8 +0,0 @@
-import org.elasticsearch.gradle.internal.test.RestIntegTestTask
-
-apply plugin: 'elasticsearch.build'
-tasks.named("test").configure { enabled = false }
-
-dependencies {
-  api project(':test:framework')
-}

+ 0 - 8
x-pack/plugin/eql/qa/build.gradle

@@ -1,8 +0,0 @@
-import org.elasticsearch.gradle.internal.test.RestIntegTestTask
-
-apply plugin: 'elasticsearch.build'
-tasks.named("test").configure { enabled = false }
-
-dependencies {
-  api project(':test:framework')
-}

+ 0 - 6
x-pack/plugin/fleet/qa/build.gradle

@@ -1,6 +0,0 @@
-apply plugin: 'elasticsearch.build'
-tasks.named("test").configure { enabled = false }
-
-dependencies {
-  api project(':test:framework')
-}

+ 0 - 6
x-pack/plugin/repositories-metering-api/qa/build.gradle

@@ -1,6 +0,0 @@
-apply plugin: 'elasticsearch.build'
-tasks.named("test").configure { enabled = false }
-
-dependencies {
-  api project(':test:framework')
-}

+ 0 - 6
x-pack/plugin/searchable-snapshots/qa/build.gradle

@@ -1,6 +0,0 @@
-apply plugin: 'elasticsearch.build'
-tasks.named("test").configure { enabled = false }
-
-dependencies {
-  api project(':test:framework')
-}

+ 0 - 6
x-pack/plugin/snapshot-repo-test-kit/qa/build.gradle

@@ -1,6 +0,0 @@
-apply plugin: 'elasticsearch.build'
-tasks.named("test").configure { enabled = false }
-
-dependencies {
-  api project(':test:framework')
-}

+ 6 - 8
x-pack/plugin/transform/qa/build.gradle

@@ -1,13 +1,11 @@
 /* Remove assemble on all qa projects because we don't need to publish
  * artifacts for them. */
-gradle.projectsEvaluated {
-  subprojects {
-    project.tasks.matching { it.name.equals('assemble') }.configureEach {
-      enabled = false
-    }
+subprojects {
+  project.tasks.matching { it.name.equals('assemble') }.configureEach {
+    enabled = false
+  }
 
-    project.tasks.matching { it.name.equals('dependenciesInfo') }.configureEach {
-      enabled = false
-    }
+  project.tasks.matching { it.name.equals('dependenciesInfo') }.configureEach {
+    enabled = false
   }
 }