File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -439,12 +439,19 @@ allprojects {
439439 }
440440
441441 File licenseHeaderFile;
442- if (eclipse. project. name. startsWith(' :x-pack' )) {
442+ String prefix = ' :x-pack' ;
443+
444+ if (Os . isFamily(Os . FAMILY_WINDOWS )) {
445+ prefix = prefix. replace(' :' , ' _' )
446+ }
447+ if (eclipse. project. name. startsWith(prefix)) {
443448 licenseHeaderFile = new File (project. rootDir, ' buildSrc/src/main/resources/license-headers/elastic-license-header.txt' )
444449 } else {
445450 licenseHeaderFile = new File (project. rootDir, ' buildSrc/src/main/resources/license-headers/oss-license-header.txt' )
446451 }
447- String licenseHeader = licenseHeaderFile. getText(' UTF-8' ). replace(' \n ' , ' \\\\ n' )
452+
453+ String lineSeparator = Os . isFamily(Os . FAMILY_WINDOWS ) ? ' \\\\ r\\\\ n' : ' \\\\ n'
454+ String licenseHeader = licenseHeaderFile. getText(' UTF-8' ). replace(System . lineSeparator(), lineSeparator)
448455 task copyEclipseSettings(type : Copy ) {
449456 // TODO: "package this up" for external builds
450457 from new File (project. rootDir, ' buildSrc/src/main/resources/eclipse.settings' )
You can’t perform that action at this time.
0 commit comments