From 074a712ab1d8df3ec022ed7812d7b146650c8367 Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Thu, 5 Jul 2018 13:41:33 -0400 Subject: [PATCH] Build: Fix detection of Eclipse Compiler Server It looks like Eclipse's compiler server recently changed something so our "eclipse detector" stopped working for it. I've updated the detector so it ought to work now. --- build.gradle | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 9d9f85db47bbc..0d77f8fd59ef0 100644 --- a/build.gradle +++ b/build.gradle @@ -125,7 +125,10 @@ Map buildMetadataMap = buildMetadataValue.tokenize(';').collectE allprojects { project.ext { // for ide hacks... - isEclipse = System.getProperty("eclipse.launcher") != null || gradle.startParameter.taskNames.contains('eclipse') || gradle.startParameter.taskNames.contains('cleanEclipse') + isEclipse = System.getProperty("eclipse.launcher") != null || // Detects gradle launched from Eclipse's IDE + System.getProperty("eclipse.application") != null || // Detects gradle launched from the Eclipse compiler server + gradle.startParameter.taskNames.contains('eclipse') || // Detects gradle launched from the command line to do eclipse stuff + gradle.startParameter.taskNames.contains('cleanEclipse') isIdea = System.getProperty("idea.active") != null || gradle.startParameter.taskNames.contains('idea') || gradle.startParameter.taskNames.contains('cleanIdea') // for BWC testing @@ -446,7 +449,7 @@ allprojects { File licenseHeaderFile; String prefix = ':x-pack'; - + if (Os.isFamily(Os.FAMILY_WINDOWS)) { prefix = prefix.replace(':', '_') } @@ -455,7 +458,7 @@ allprojects { } else { licenseHeaderFile = new File(project.rootDir, 'buildSrc/src/main/resources/license-headers/oss-license-header.txt') } - + String lineSeparator = Os.isFamily(Os.FAMILY_WINDOWS) ? '\\\\r\\\\n' : '\\\\n' String licenseHeader = licenseHeaderFile.getText('UTF-8').replace(System.lineSeparator(), lineSeparator) task copyEclipseSettings(type: Copy) {