Skip to content
Snippets Groups Projects
Commit de3fdc3d authored by Maxim Shafirov's avatar Maxim Shafirov
Browse files

Don't use windows path separator (even on windows)

parent 3a9255a6
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -28,7 +28,7 @@ class KWP implements Plugin<Project> {
writeSafely(new File(targetDir, "__modules.js")) { buf ->
dependencies.each {jar ->
def m = unzipSafely(jar, targetDir)
buf.append("require('${m.absolutePath}');\n")
buf.append("require('${normalizedAbsolutePath(m)}');\n")
}
}
 
Loading
Loading
@@ -51,7 +51,7 @@ class KWP implements Plugin<Project> {
dependencies.addAll(configuration.resolve())
dependencies.addAll(configuration.allArtifacts.files)
 
sources.add(new File(project.projectDir, "src/main/kotlin").getAbsolutePath())
sources.add(normalizedAbsolutePath(new File(project.projectDir, "src/main/kotlin")))
}
 
File unzipSafely(File jar, File targetFolder) {
Loading
Loading
@@ -91,4 +91,8 @@ class KWP implements Plugin<Project> {
def contents = buffer.toString()
if (!file.exists() || file.text != contents) file.text = contents
}
String normalizedAbsolutePath(File file) {
return file.absolutePath.replace('\\', '/')
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment