Skip to content

Commit ca82c4b

Browse files
committed
Added windows distinction inside plugin
1 parent 2c6bd97 commit ca82c4b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugin/src/main/java/pl/lemanski/plugin/KonanPlugin.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ abstract class KonanPlugin : Plugin<Project> {
4242

4343
libName.set(extension.libName)
4444
objectFiles.from(konanClangCompile)
45-
runKonan.set(File(extension.konanPath.get()).resolve("bin/run_konan.bat"))
45+
// check if we are on windows
46+
val isWindows = System.getProperty("os.name").lowercase().contains("windows")
47+
val scriptPath = if (isWindows) "bin/run_konan.bat" else "bin/run_konan"
48+
runKonan.set(File(extension.konanPath.get()).resolve(scriptPath))
4649
}
4750
}
4851
}

0 commit comments

Comments
 (0)