2015-10-29 14:40:19 -04:00
|
|
|
rootProject.name = 'elasticsearch'
|
|
|
|
|
2015-11-05 01:28:57 -05:00
|
|
|
List projects = [
|
2015-10-29 14:40:19 -04:00
|
|
|
'rest-api-spec',
|
|
|
|
'core',
|
2015-12-03 17:52:51 -05:00
|
|
|
'distribution:integ-test-zip',
|
2015-10-29 14:40:19 -04:00
|
|
|
'distribution:zip',
|
|
|
|
'distribution:tar',
|
|
|
|
'distribution:deb',
|
|
|
|
'distribution:rpm',
|
2015-12-17 19:57:39 -05:00
|
|
|
'test:framework',
|
2015-12-15 23:14:37 -05:00
|
|
|
'test:fixtures:example-fixture',
|
2015-12-20 16:00:37 -05:00
|
|
|
'test:fixtures:hdfs-fixture',
|
2016-01-14 09:50:11 -05:00
|
|
|
'modules:ingest-grok',
|
2015-12-03 17:18:26 -05:00
|
|
|
'modules:lang-expression',
|
|
|
|
'modules:lang-groovy',
|
2015-12-08 22:45:21 -05:00
|
|
|
'modules:lang-mustache',
|
2015-10-29 14:40:19 -04:00
|
|
|
'plugins:analysis-icu',
|
|
|
|
'plugins:analysis-kuromoji',
|
|
|
|
'plugins:analysis-phonetic',
|
|
|
|
'plugins:analysis-smartcn',
|
|
|
|
'plugins:analysis-stempel',
|
|
|
|
'plugins:delete-by-query',
|
|
|
|
'plugins:discovery-azure',
|
|
|
|
'plugins:discovery-ec2',
|
|
|
|
'plugins:discovery-gce',
|
|
|
|
'plugins:discovery-multicast',
|
2016-01-08 16:44:47 -05:00
|
|
|
'plugins:ingest-geoip',
|
2015-10-29 14:40:19 -04:00
|
|
|
'plugins:lang-javascript',
|
2015-12-09 19:32:37 -05:00
|
|
|
'plugins:lang-plan-a',
|
2015-10-29 14:40:19 -04:00
|
|
|
'plugins:lang-python',
|
2015-11-08 02:19:50 -05:00
|
|
|
'plugins:mapper-attachments',
|
2015-10-29 14:40:19 -04:00
|
|
|
'plugins:mapper-murmur3',
|
|
|
|
'plugins:mapper-size',
|
|
|
|
'plugins:repository-azure',
|
2015-11-24 18:04:40 -05:00
|
|
|
'plugins:repository-hdfs',
|
2015-10-29 14:40:19 -04:00
|
|
|
'plugins:repository-s3',
|
|
|
|
'plugins:jvm-example',
|
|
|
|
'plugins:site-example',
|
|
|
|
'plugins:store-smb',
|
2015-11-03 21:42:22 -05:00
|
|
|
'qa:evil-tests',
|
2015-10-29 14:40:19 -04:00
|
|
|
'qa:smoke-test-client',
|
2015-11-22 17:46:47 -05:00
|
|
|
'qa:smoke-test-multinode',
|
2015-11-02 12:40:47 -05:00
|
|
|
'qa:smoke-test-plugins',
|
2015-12-10 09:59:41 -05:00
|
|
|
'qa:ingest-with-mustache',
|
2015-12-22 10:51:25 -05:00
|
|
|
'qa:ingest-disabled',
|
2015-11-02 12:40:47 -05:00
|
|
|
'qa:vagrant',
|
2015-10-29 14:40:19 -04:00
|
|
|
]
|
|
|
|
|
2015-11-05 01:28:57 -05:00
|
|
|
boolean isEclipse = System.getProperty("eclipse.launcher") != null || gradle.startParameter.taskNames.contains('eclipse') || gradle.startParameter.taskNames.contains('cleanEclipse')
|
|
|
|
if (isEclipse) {
|
|
|
|
// eclipse cannot handle an intermediate dependency between main and test, so we must create separate projects
|
|
|
|
// for core-src and core-tests
|
|
|
|
projects << 'core-tests'
|
2015-10-29 14:40:19 -04:00
|
|
|
}
|
|
|
|
|
2015-11-05 01:28:57 -05:00
|
|
|
include projects.toArray(new String[0])
|
|
|
|
|
|
|
|
if (isEclipse) {
|
2015-11-06 14:45:32 -05:00
|
|
|
project(":core").projectDir = new File(rootProject.projectDir, 'core/src/main')
|
|
|
|
project(":core").buildFileName = 'eclipse-build.gradle'
|
|
|
|
project(":core-tests").projectDir = new File(rootProject.projectDir, 'core/src/test')
|
|
|
|
project(":core-tests").buildFileName = 'eclipse-build.gradle'
|
2015-10-29 14:40:19 -04:00
|
|
|
}
|
|
|
|
|
2015-11-20 14:58:50 -05:00
|
|
|
/**
|
|
|
|
* Iterates over sub directories, looking for build.gradle, and adds a project if found
|
|
|
|
* for that dir with the given path prefix. Note that this requires each level
|
|
|
|
* of the dir hiearchy to have a build.gradle. Otherwise we would have to iterate
|
|
|
|
* all files/directories in the source tree to find all projects.
|
|
|
|
*/
|
|
|
|
void addSubProjects(String path, File dir) {
|
|
|
|
if (dir.isDirectory() == false) return;
|
2015-11-23 17:11:32 -05:00
|
|
|
if (dir.name == 'buildSrc') return;
|
2015-11-20 14:58:50 -05:00
|
|
|
if (new File(dir, 'build.gradle').exists() == false) return;
|
|
|
|
|
|
|
|
String projectName = "${path}:${dir.name}"
|
|
|
|
include projectName
|
|
|
|
for (File subdir : dir.listFiles()) {
|
|
|
|
addSubProjects(projectName, subdir)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-11-23 17:44:37 -05:00
|
|
|
// look for extra plugins for elasticsearch
|
|
|
|
File xplugins = new File(rootProject.projectDir.parentFile, 'x-plugins')
|
|
|
|
if (xplugins.exists()) {
|
|
|
|
include ':x-plugins'
|
|
|
|
project(':x-plugins').projectDir = xplugins
|
|
|
|
for (File extraPluginDir : xplugins.listFiles()) {
|
|
|
|
addSubProjects(':x-plugins', extraPluginDir)
|
|
|
|
}
|
2015-11-20 14:58:50 -05:00
|
|
|
}
|
|
|
|
|