From 2d7d3bda90d6e833c6595d2673db23845d2eeb69 Mon Sep 17 00:00:00 2001 From: Rene Groeschke Date: Wed, 4 Aug 2021 09:39:37 +0200 Subject: [PATCH] Use TestArtifact plugin instead of custom test jar tasks (#75931) Make use of test artifact plugin and avoid using custom test jars created manually. Co-authored-by: Elastic Machine --- x-pack/plugin/sql/qa/jdbc/security/build.gradle | 17 ++++------------- .../plugin/sql/qa/server/security/build.gradle | 17 ++++------------- 2 files changed, 8 insertions(+), 26 deletions(-) diff --git a/x-pack/plugin/sql/qa/jdbc/security/build.gradle b/x-pack/plugin/sql/qa/jdbc/security/build.gradle index 950b5b2250641..917d319888cf1 100644 --- a/x-pack/plugin/sql/qa/jdbc/security/build.gradle +++ b/x-pack/plugin/sql/qa/jdbc/security/build.gradle @@ -1,29 +1,20 @@ import org.elasticsearch.gradle.internal.test.RestIntegTestTask +apply plugin: 'elasticsearch.internal-test-artifact' + dependencies { testImplementation project(':x-pack:plugin:core') } Project mainProject = project -configurations.create('testArtifacts') - -TaskProvider testJar = tasks.register("testJar", Jar) { - appendix 'test' - from sourceSets.test.output -} - -artifacts { - testArtifacts testJar -} - subprojects { // Use tests from the root security qa project in subprojects - configurations.create('testArtifacts') + configurations.create('testArtifacts').transitive(false) dependencies { testImplementation project(":x-pack:plugin:core") - testArtifacts project(path: mainProject.path, configuration: 'testArtifacts') + testArtifacts testArtifact(project(mainProject.path)) } testClusters.all { diff --git a/x-pack/plugin/sql/qa/server/security/build.gradle b/x-pack/plugin/sql/qa/server/security/build.gradle index 375c654645955..59bbba8b7e70d 100644 --- a/x-pack/plugin/sql/qa/server/security/build.gradle +++ b/x-pack/plugin/sql/qa/server/security/build.gradle @@ -1,30 +1,21 @@ +apply plugin: 'elasticsearch.internal-test-artifact' + dependencies { testImplementation project(':x-pack:plugin:core') } Project mainProject = project -configurations.create('testArtifacts') - -TaskProvider testJar = tasks.register("testJar", Jar) { - appendix 'test' - from sourceSets.test.output -} - -artifacts { - testArtifacts testJar -} - // Tests are pushed down to subprojects and will be checked there. tasks.named("testingConventions").configure { enabled = false } subprojects { // Use tests from the root security qa project in subprojects - configurations.create('testArtifacts') + configurations.create('testArtifacts').transitive(false) dependencies { testImplementation project(":x-pack:plugin:core") - testArtifacts project(path: mainProject.path, configuration: 'testArtifacts') + testArtifacts testArtifact(project(mainProject.path)) } testClusters.matching { it.name == "integTest" }.configureEach {