Merge pull request elastic/elasticsearch#1015 from rjernst/attach_without_subdir

Build: Change x-plugins setup with elasticsearch to a sibling directory

Original commit: elastic/x-pack-elasticsearch@d9f309c6db
This commit is contained in:
Ryan Ernst 2015-11-23 15:51:41 -08:00
commit 3f856e7939
3 changed files with 10 additions and 8 deletions

View File

@ -1,11 +1,5 @@
if (project.name != 'x-plugins') { if (project.projectDir.name != 'x-plugins') {
throw new GradleException('You must checkout x-plugins to a directory named x-plugins') throw new GradleException('You must checkout x-plugins in a directory named x-plugins next to elasticsearch')
}
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')
} }
/* /*

6
buildSrc/settings.gradle Normal file
View File

@ -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')

2
settings.gradle Normal file
View File

@ -0,0 +1,2 @@
project(':').projectDir = new File('../elasticsearch')
apply from: '../elasticsearch/settings.gradle'