File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -439,12 +439,19 @@ allprojects {
439
439
}
440
440
441
441
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)) {
443
448
licenseHeaderFile = new File (project. rootDir, ' buildSrc/src/main/resources/license-headers/elastic-license-header.txt' )
444
449
} else {
445
450
licenseHeaderFile = new File (project. rootDir, ' buildSrc/src/main/resources/license-headers/oss-license-header.txt' )
446
451
}
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)
448
455
task copyEclipseSettings(type : Copy ) {
449
456
// TODO: "package this up" for external builds
450
457
from new File (project. rootDir, ' buildSrc/src/main/resources/eclipse.settings' )
You can’t perform that action at this time.
0 commit comments