diff --git a/build/groovy/org/jetbrains/intellij/build/BuildContext.groovy b/build/groovy/org/jetbrains/intellij/build/BuildContext.groovy index 9e0bdb540a4d..1ee57ba15df5 100644 --- a/build/groovy/org/jetbrains/intellij/build/BuildContext.groovy +++ b/build/groovy/org/jetbrains/intellij/build/BuildContext.groovy @@ -83,6 +83,9 @@ abstract class BuildContext { } } +/** + * All paths are absolute and use '/' as a separator + */ abstract class BuildPaths { /** * Path to a directory where idea/community Git repository is checked out diff --git a/build/groovy/org/jetbrains/intellij/build/impl/BuildContextImpl.groovy b/build/groovy/org/jetbrains/intellij/build/impl/BuildContextImpl.groovy index ec92f520d85a..a9a531ea338c 100644 --- a/build/groovy/org/jetbrains/intellij/build/impl/BuildContextImpl.groovy +++ b/build/groovy/org/jetbrains/intellij/build/impl/BuildContextImpl.groovy @@ -214,12 +214,16 @@ class BuildContextImpl extends BuildContext { class BuildPathsImpl extends BuildPaths { BuildPathsImpl(String communityHome, String projectHome, String buildOutputRoot, String jdkHome) { - this.communityHome = new File(communityHome).canonicalPath - this.projectHome = new File(projectHome).canonicalPath - this.buildOutputRoot = new File(buildOutputRoot).canonicalPath - this.jdkHome = new File(jdkHome).canonicalPath + this.communityHome = toCanonicalPath(communityHome) + this.projectHome = toCanonicalPath(projectHome) + this.buildOutputRoot = toCanonicalPath(buildOutputRoot) + this.jdkHome = toCanonicalPath(jdkHome) artifacts = "${this.buildOutputRoot}/artifacts" - distAll = "$buildOutputRoot/dist.all" - temp = "$buildOutputRoot/temp" + distAll = "${this.buildOutputRoot}/dist.all" + temp = "${this.buildOutputRoot}/temp" + } + + private static String toCanonicalPath(String communityHome) { + FileUtil.toSystemIndependentName(new File(communityHome).canonicalPath) } }