From 31c33fdb9b70de5935522f4fd455edb319f33d59 Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Mon, 7 Jan 2019 09:21:25 +0100 Subject: [PATCH] MINOR: Remove some Deadcode in Gradle (#37160) --- build.gradle | 8 ++------ buildSrc/build.gradle | 1 - client/rest-high-level/build.gradle | 3 --- distribution/build.gradle | 2 -- plugins/discovery-gce/build.gradle | 2 -- qa/full-cluster-restart/build.gradle | 1 - qa/verify-version-constants/build.gradle | 1 - test/build.gradle | 2 -- x-pack/build.gradle | 2 -- x-pack/plugin/core/build.gradle | 2 -- x-pack/plugin/ml/cpp-snapshot/build.gradle | 1 - x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle | 2 -- x-pack/plugin/sql/sql-cli/build.gradle | 2 -- x-pack/qa/full-cluster-restart/build.gradle | 1 - x-pack/qa/smoke-test-plugins-ssl/build.gradle | 2 -- x-pack/qa/smoke-test-watcher/build.gradle | 5 ----- x-pack/qa/third-party/hipchat/build.gradle | 2 -- x-pack/qa/third-party/slack/build.gradle | 3 --- 18 files changed, 2 insertions(+), 40 deletions(-) diff --git a/build.gradle b/build.gradle index 655e6b54da1..83ef4675f00 100644 --- a/build.gradle +++ b/build.gradle @@ -24,13 +24,9 @@ import org.elasticsearch.gradle.Version import org.elasticsearch.gradle.VersionCollection import org.elasticsearch.gradle.VersionProperties import org.elasticsearch.gradle.plugin.PluginBuildPlugin -import org.gradle.api.tasks.options.Option -import org.gradle.util.GradleVersion -import org.gradle.util.DistributionLocator +import org.gradle.util.GradleVersion +import org.gradle.util.DistributionLocator import org.gradle.plugins.ide.eclipse.model.SourceFolder -import com.carrotsearch.gradle.junit4.RandomizedTestingTask - -import java.util.function.Predicate plugins { id 'com.gradle.build-scan' version '2.0.2' diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index cd6c97078b8..029727df389 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -16,7 +16,6 @@ * specific language governing permissions and limitations * under the License. */ -import java.nio.file.Files import org.gradle.util.GradleVersion plugins { diff --git a/client/rest-high-level/build.gradle b/client/rest-high-level/build.gradle index 8ec19cc8da0..9b9074b3d9b 100644 --- a/client/rest-high-level/build.gradle +++ b/client/rest-high-level/build.gradle @@ -16,9 +16,6 @@ * specific language governing permissions and limitations * under the License. */ -import org.elasticsearch.gradle.test.RestIntegTestTask -import org.gradle.api.internal.provider.Providers - apply plugin: 'elasticsearch.build' apply plugin: 'elasticsearch.rest-test' apply plugin: 'nebula.maven-base-publish' diff --git a/distribution/build.gradle b/distribution/build.gradle index 317ece6bf2b..0e439b3586b 100644 --- a/distribution/build.gradle +++ b/distribution/build.gradle @@ -26,8 +26,6 @@ import org.apache.tools.ant.filters.FixCrLfFilter import java.nio.file.Files import java.nio.file.Path -Collection distributions = project('archives').subprojects + project('packages').subprojects - /***************************************************************************** * Third party dependencies report * *****************************************************************************/ diff --git a/plugins/discovery-gce/build.gradle b/plugins/discovery-gce/build.gradle index 4d02cff0119..fa2519fa624 100644 --- a/plugins/discovery-gce/build.gradle +++ b/plugins/discovery-gce/build.gradle @@ -1,5 +1,3 @@ -import org.elasticsearch.gradle.LoggedExec - esplugin { description 'The Google Compute Engine (GCE) Discovery plugin allows to use GCE API for the unicast discovery mechanism.' classname 'org.elasticsearch.plugin.discovery.gce.GceDiscoveryPlugin' diff --git a/qa/full-cluster-restart/build.gradle b/qa/full-cluster-restart/build.gradle index 4a5f59b6a74..39bec5ac0b3 100644 --- a/qa/full-cluster-restart/build.gradle +++ b/qa/full-cluster-restart/build.gradle @@ -19,7 +19,6 @@ import org.elasticsearch.gradle.Version -import org.elasticsearch.gradle.VersionCollection import org.elasticsearch.gradle.test.RestIntegTestTask apply plugin: 'elasticsearch.standalone-test' diff --git a/qa/verify-version-constants/build.gradle b/qa/verify-version-constants/build.gradle index 3160117f7a2..a4cfa268755 100644 --- a/qa/verify-version-constants/build.gradle +++ b/qa/verify-version-constants/build.gradle @@ -17,7 +17,6 @@ * under the License. */ -import java.util.Locale import org.elasticsearch.gradle.Version import org.elasticsearch.gradle.VersionProperties import org.elasticsearch.gradle.test.RestIntegTestTask diff --git a/test/build.gradle b/test/build.gradle index d0a3065e7c8..82938355288 100644 --- a/test/build.gradle +++ b/test/build.gradle @@ -17,8 +17,6 @@ * under the License. */ -import org.elasticsearch.gradle.precommit.PrecommitTasks - subprojects { // fixtures is just intermediate parent project if (name == 'fixtures') return diff --git a/x-pack/build.gradle b/x-pack/build.gradle index e1c72c73479..a0db6d9a78b 100644 --- a/x-pack/build.gradle +++ b/x-pack/build.gradle @@ -1,6 +1,4 @@ -import org.elasticsearch.gradle.BuildPlugin import org.elasticsearch.gradle.plugin.PluginBuildPlugin -import org.elasticsearch.gradle.Version import org.elasticsearch.gradle.precommit.LicenseHeadersTask Project xpackRootProject = project diff --git a/x-pack/plugin/core/build.gradle b/x-pack/plugin/core/build.gradle index 817d994fa8b..e961088b9d9 100644 --- a/x-pack/plugin/core/build.gradle +++ b/x-pack/plugin/core/build.gradle @@ -1,9 +1,7 @@ import org.elasticsearch.gradle.MavenFilteringHack import java.nio.file.Files -import java.nio.file.Path import java.nio.file.Paths -import java.nio.file.StandardCopyOption import com.carrotsearch.gradle.junit4.RandomizedTestingTask; apply plugin: 'elasticsearch.esplugin' diff --git a/x-pack/plugin/ml/cpp-snapshot/build.gradle b/x-pack/plugin/ml/cpp-snapshot/build.gradle index 1c35d9db6f3..e47566cc82c 100644 --- a/x-pack/plugin/ml/cpp-snapshot/build.gradle +++ b/x-pack/plugin/ml/cpp-snapshot/build.gradle @@ -1,4 +1,3 @@ -import java.net.HttpURLConnection import org.elasticsearch.gradle.VersionProperties apply plugin: 'distribution' diff --git a/x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle b/x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle index 59867283f0c..188086afcf1 100644 --- a/x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle +++ b/x-pack/plugin/ml/qa/native-multi-node-tests/build.gradle @@ -1,5 +1,3 @@ -import org.elasticsearch.gradle.LoggedExec - apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.rest-test' diff --git a/x-pack/plugin/sql/sql-cli/build.gradle b/x-pack/plugin/sql/sql-cli/build.gradle index dbeeda5ee2d..77e04c3c015 100644 --- a/x-pack/plugin/sql/sql-cli/build.gradle +++ b/x-pack/plugin/sql/sql-cli/build.gradle @@ -1,5 +1,3 @@ -import de.thetaphi.forbiddenapis.gradle.CheckForbiddenApis - /* * This project is named sql-cli because it is in the "org.elasticsearch.plugin" * group and it'd be super confusing for it to just be called "cli" there. diff --git a/x-pack/qa/full-cluster-restart/build.gradle b/x-pack/qa/full-cluster-restart/build.gradle index bf2d556c4af..5ac7c0befb7 100644 --- a/x-pack/qa/full-cluster-restart/build.gradle +++ b/x-pack/qa/full-cluster-restart/build.gradle @@ -3,7 +3,6 @@ import org.elasticsearch.gradle.test.RestIntegTestTask import org.elasticsearch.gradle.Version import java.nio.charset.StandardCharsets -import java.nio.file.Paths import java.util.regex.Matcher // Apply the java plugin to this project so the sources can be edited in an IDE diff --git a/x-pack/qa/smoke-test-plugins-ssl/build.gradle b/x-pack/qa/smoke-test-plugins-ssl/build.gradle index 2304421bee7..5d1bccd10a6 100644 --- a/x-pack/qa/smoke-test-plugins-ssl/build.gradle +++ b/x-pack/qa/smoke-test-plugins-ssl/build.gradle @@ -1,6 +1,4 @@ -import org.elasticsearch.gradle.LoggedExec import org.elasticsearch.gradle.MavenFilteringHack -import org.elasticsearch.gradle.plugin.PluginBuildPlugin import org.elasticsearch.gradle.test.NodeInfo import javax.net.ssl.HttpsURLConnection diff --git a/x-pack/qa/smoke-test-watcher/build.gradle b/x-pack/qa/smoke-test-watcher/build.gradle index fc22fe9aa06..6a9b9415588 100644 --- a/x-pack/qa/smoke-test-watcher/build.gradle +++ b/x-pack/qa/smoke-test-watcher/build.gradle @@ -1,8 +1,3 @@ -import groovy.json.JsonSlurper - -import javax.net.ssl.HttpsURLConnection -import java.nio.charset.StandardCharsets - apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.rest-test' diff --git a/x-pack/qa/third-party/hipchat/build.gradle b/x-pack/qa/third-party/hipchat/build.gradle index d72bb778e52..f864fb62398 100644 --- a/x-pack/qa/third-party/hipchat/build.gradle +++ b/x-pack/qa/third-party/hipchat/build.gradle @@ -1,5 +1,3 @@ -import org.elasticsearch.gradle.LoggedExec - apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.rest-test' diff --git a/x-pack/qa/third-party/slack/build.gradle b/x-pack/qa/third-party/slack/build.gradle index 03537966b29..9fdfaeb8266 100644 --- a/x-pack/qa/third-party/slack/build.gradle +++ b/x-pack/qa/third-party/slack/build.gradle @@ -1,6 +1,3 @@ -import org.elasticsearch.gradle.test.NodeInfo -import org.elasticsearch.gradle.LoggedExec - apply plugin: 'elasticsearch.standalone-rest-test' apply plugin: 'elasticsearch.rest-test'