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 {
445
445
}
446
446
447
447
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)) {
449
454
licenseHeaderFile = new File (project. rootDir, ' buildSrc/src/main/resources/license-headers/elastic-license-header.txt' )
450
455
} else {
451
456
licenseHeaderFile = new File (project. rootDir, ' buildSrc/src/main/resources/license-headers/oss-license-header.txt' )
452
457
}
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)
454
461
task copyEclipseSettings(type : Copy ) {
455
462
// TODO: "package this up" for external builds
456
463
from new File (project. rootDir, ' buildSrc/src/main/resources/eclipse.settings' )
You can’t perform that action at this time.
0 commit comments