You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,10 +47,10 @@ Installation
47
47
48
48
To use `kscript` just Kotlin and Maven are required. To [install Kotlin](https://kotlinlang.org/docs/tutorials/command-line.html) we recommend [sdkman](http://sdkman.io/install):
Copy file name to clipboardExpand all lines: src/main/kotlin/kscript/app/AppHelpers.kt
+47-17Lines changed: 47 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -207,6 +207,8 @@ fun launchIdeaWithKscriptlet(scriptFile: File,
207
207
includeURLs:List<URL>,
208
208
compilerOpts:String): String {
209
209
val intellijCommand =System.getenv("KSCRIPT_IDEA_COMMAND") ?:"idea"
210
+
val gradleCommand =System.getenv("KSCRIPT_GRADLE_COMMAND") ?:"gradle"
211
+
210
212
requireInPath(intellijCommand, "Could not find '$intellijCommand' in your PATH. You must set the command used to launch your intellij as 'KSCRIPT_IDEA_COMMAND' env property")
211
213
212
214
infoMsg("Setting up idea project from ${scriptFile}")
@@ -229,20 +231,10 @@ fun launchIdeaWithKscriptlet(scriptFile: File,
val scriptDir =Paths.get(scriptFile.absolutePath).parent
332
324
333
325
// also symlink all includes
334
326
includeURLs.distinctBy { it.fileName() }
335
327
.forEach {
336
328
val symlinkSrcDirAndDestination =when {
337
329
it.protocol =="file"-> {
338
330
val includeFile =File(it.toURI())
339
-
val includeDir =Paths.get(includeFile.path).parent
331
+
val includeDir =Paths.get(includeFile.absolutePath).parent
340
332
val symlinkRelativePathToScript =File(this, scriptDir.relativize(includeDir).toFile().path)
341
333
symlinkRelativePathToScript.mkdirs()
342
334
Pair(symlinkRelativePathToScript, includeFile)
@@ -351,11 +343,50 @@ $kotlinOptions
351
343
}
352
344
353
345
val projectPath = tmpProjectDir.absolutePath
346
+
347
+
// Create gradle wrapper
348
+
requireInPath("$gradleCommand", "Could not find '$gradleCommand' in your PATH. You must set the command used to launch your intellij as 'KSCRIPT_GRADLE_COMMAND' env property")
0 commit comments