From 2f4dca744f2f255ceee75414dbdb49df4542b41c Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Mon, 23 Nov 2015 14:18:07 -0800 Subject: [PATCH 1/2] Build: Change x-plugins setup with elasticsearch to a sibling directory This change is the x-plugins side of elastic/elasticsearchelastic/elasticsearch#14952. It now requires x-plugins to be checked out as a sibling of elasticsearch called extra-plugin-x-plugins. Original commit: elastic/x-pack-elasticsearch@f69b16740783af9d481df3b3ddb9331ff45c3027 --- build.gradle | 10 ++-------- buildSrc/settings.gradle | 6 ++++++ settings.gradle | 2 ++ 3 files changed, 10 insertions(+), 8 deletions(-) create mode 100644 buildSrc/settings.gradle create mode 100644 settings.gradle diff --git a/build.gradle b/build.gradle index 559bf2f9c28..1a8c392fab8 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,5 @@ -if (project.name != 'x-plugins') { - throw new GradleException('You must checkout x-plugins to a directory named x-plugins') -} -if (project.projectDir.parentFile.name != 'extra-plugins') { - throw new GradleException('You must place the x-plugins checkout in a directory named extra-plugins') -} -if (project.rootProject.projectDir != project.projectDir.parentFile.parentFile) { - throw new GradleException('You must place the extra-plugins directory inside the root of an elasticsearch checkout') +if (project.projectDir.name != 'extra-plugin-x-plugins') { + throw new GradleException('You must checkout x-plugins in a directory named extra-plugin-x-plugins') } /* diff --git a/buildSrc/settings.gradle b/buildSrc/settings.gradle new file mode 100644 index 00000000000..fede2f180e7 --- /dev/null +++ b/buildSrc/settings.gradle @@ -0,0 +1,6 @@ +File elasticsearchDir = new File(settingsDir, '../../elasticsearch') +if (elasticsearchDir.exists() == false) { + throw new GradleException('Elasticsearch must be checked out as a sibling directory of x-plugins') +} + +project(':').projectDir = new File(elasticsearchDir, 'buildSrc') diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 00000000000..651d9aca508 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,2 @@ +project(':').projectDir = new File('../elasticsearch') +apply from: '../elasticsearch/settings.gradle' From c53390cbdf82a936dab001ed29e2889056f5c0c5 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Mon, 23 Nov 2015 14:45:24 -0800 Subject: [PATCH 2/2] Change to x-plugins directory name instead of extra-plugin-x-plugins Original commit: elastic/x-pack-elasticsearch@2b609414b7bdcb7567d08557f55ac9dddd76fae2 --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 1a8c392fab8..38be8951a45 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ -if (project.projectDir.name != 'extra-plugin-x-plugins') { - throw new GradleException('You must checkout x-plugins in a directory named extra-plugin-x-plugins') +if (project.projectDir.name != 'x-plugins') { + throw new GradleException('You must checkout x-plugins in a directory named x-plugins next to elasticsearch') } /*