Add possibility to get location of the script.main.kts file

#KT-48414 fixed
This commit is contained in:
Alexey Subach
2021-09-19 21:53:13 +03:00
committed by Ilya Chernikov
parent 7ddf83f32d
commit ca2f37f6eb
13 changed files with 177 additions and 7 deletions
@@ -0,0 +1,4 @@
@file:ScriptFileLocation("scriptFileLocation")
__FILE__.absolutePath
@@ -0,0 +1,4 @@
@file:ScriptFileLocation("scriptFileLocation")
scriptFileLocation.absolutePath
@@ -0,0 +1,2 @@
__FILE__.absolutePath
@@ -0,0 +1,5 @@
import java.io.File
fun getDependentScriptFile(): File {
return __FILE__
}
@@ -0,0 +1,3 @@
val __FILE__ = "success"
__FILE__
@@ -0,0 +1,4 @@
@file:Import("script-file-location-helper-imported-file.main.kts")
arrayOf(__FILE__.absolutePath, getDependentScriptFile().absolutePath)