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 @@ -445,12 +445,19 @@ allprojects {
445445 }
446446
447447 File licenseHeaderFile;
448- if (eclipse. project. name. startsWith(' :x-pack' )) {
448+ String prefix = ' :x-pack' ;
449+
450+ if (Os . isFamily(Os . FAMILY_WINDOWS )) {
451+ prefix = prefix. replace(' :' , ' _' )
452+ }
453+ if (eclipse. project. name. startsWith(prefix)) {
449454 licenseHeaderFile = new File (project. rootDir, ' buildSrc/src/main/resources/license-headers/elastic-license-header.txt' )
450455 } else {
451456 licenseHeaderFile = new File (project. rootDir, ' buildSrc/src/main/resources/license-headers/oss-license-header.txt' )
452457 }
453- String licenseHeader = licenseHeaderFile. getText(' UTF-8' ). replace(' \n ' , ' \\\\ n' )
458+
459+ String lineSeparator = Os . isFamily(Os . FAMILY_WINDOWS ) ? ' \\\\ r\\\\ n' : ' \\\\ n'
460+ String licenseHeader = licenseHeaderFile. getText(' UTF-8' ). replace(System . lineSeparator(), lineSeparator)
454461 task copyEclipseSettings(type : Copy ) {
455462 // TODO: "package this up" for external builds
456463 from new File (project. rootDir, ' buildSrc/src/main/resources/eclipse.settings' )
You can’t perform that action at this time.
0 commit comments