fixed file separators

This commit is contained in:
nik
2011-03-30 13:41:09 +04:00
parent c5aa371367
commit a2f27940ae
4 changed files with 15 additions and 4 deletions
+10
View File
@@ -0,0 +1,10 @@
package org.jetbrains.jps
/**
* @author nik
*/
class PathUtil {
static String toSystemIndependentPath(String path) {
return path.replace('\\', '/')
}
}
@@ -367,8 +367,8 @@ public class IdeaProjectLoader {
if (projectOutputPath == null) {
project.error("Module '$currentModuleName' uses output path inherited from project but project output path is not specified")
}
currentModule.outputPath = new File(new File(projectOutputPath, "production"), currentModuleName).absolutePath
currentModule.testOutputPath = new File(new File(projectOutputPath, "test"), currentModuleName).absolutePath
currentModule.outputPath = PathUtil.toSystemIndependentPath(new File(new File(projectOutputPath, "production"), currentModuleName).absolutePath)
currentModule.testOutputPath = PathUtil.toSystemIndependentPath(new File(new File(projectOutputPath, "test"), currentModuleName).absolutePath)
}
else {
currentModule.outputPath = moduleMacroExpander.expandMacros(IdeaProjectLoadingUtil.pathFromUrl(componentTag.output[0]?.@url))
@@ -1,6 +1,7 @@
package org.jetbrains.jps.idea
import org.jetbrains.jps.MacroExpander
import org.jetbrains.jps.PathUtil
/**
* @author nik
@@ -11,7 +12,7 @@ public class ProjectMacroExpander implements MacroExpander {
ProjectMacroExpander(Map<String, String> pathVariables, String projectBasePath) {
this.pathVariables = pathVariables
this.projectBasePath = projectBasePath
this.projectBasePath = PathUtil.toSystemIndependentPath(projectBasePath)
}
@Override
@@ -18,7 +18,7 @@ class AntPrePostStepsInArtifactsTest extends JpsBuildTestCase {
file("file.txt")
}
file("prestep.txt", "pre1")
file("poststep.txt", "$outDir.absolutePath/artifacts/main")
file("poststep.txt", "${PathUtil.toSystemIndependentPath(outDir.absolutePath)}/artifacts/main")
}
}
}