Build: Line up IDE detection logic

The IDE detection logic in build.gradle and settings.gradle has to match
or else Eclipse users will have a bad time. But in this case I think it
mostly just hits folks who use the Eclipse compiler server like me.
This commit is contained in:
Nik Everett 2018-08-24 16:11:07 -04:00
parent b86dad22ce
commit a9a66a09dc
1 changed files with 6 additions and 1 deletions

View File

@ -78,7 +78,12 @@ addSubProjects('', new File(rootProject.projectDir, 'plugins'))
addSubProjects('', new File(rootProject.projectDir, 'qa'))
addSubProjects('', new File(rootProject.projectDir, 'x-pack'))
boolean isEclipse = System.getProperty("eclipse.launcher") != null || gradle.startParameter.taskNames.contains('eclipse') || gradle.startParameter.taskNames.contains('cleanEclipse')
List startTasks = gradle.startParameter.taskNames
boolean isEclipse =
System.getProperty("eclipse.launcher") != null || // Detects gradle launched from the Eclipse IDE
System.getProperty("eclipse.application") != null || // Detects gradle launched from the Eclipse compiler server
startTasks.contains("eclipse") || // Detects gradle launched from the command line to do Eclipse stuff
startTasks.contains("cleanEclipse");
if (isEclipse) {
// eclipse cannot handle an intermediate dependency between main and test, so we must create separate projects
// for server-src and server-tests