Skip to content

Commit a9a66a0

Browse files
committed
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.
1 parent b86dad2 commit a9a66a0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

settings.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,12 @@ addSubProjects('', new File(rootProject.projectDir, 'plugins'))
7878
addSubProjects('', new File(rootProject.projectDir, 'qa'))
7979
addSubProjects('', new File(rootProject.projectDir, 'x-pack'))
8080

81-
boolean isEclipse = System.getProperty("eclipse.launcher") != null || gradle.startParameter.taskNames.contains('eclipse') || gradle.startParameter.taskNames.contains('cleanEclipse')
81+
List startTasks = gradle.startParameter.taskNames
82+
boolean isEclipse =
83+
System.getProperty("eclipse.launcher") != null || // Detects gradle launched from the Eclipse IDE
84+
System.getProperty("eclipse.application") != null || // Detects gradle launched from the Eclipse compiler server
85+
startTasks.contains("eclipse") || // Detects gradle launched from the command line to do Eclipse stuff
86+
startTasks.contains("cleanEclipse");
8287
if (isEclipse) {
8388
// eclipse cannot handle an intermediate dependency between main and test, so we must create separate projects
8489
// for server-src and server-tests

0 commit comments

Comments
 (0)