Add possibility to get location of the script.main.kts file
#KT-48414 fixed
This commit is contained in:
committed by
Ilya Chernikov
parent
7ddf83f32d
commit
ca2f37f6eb
+4
@@ -0,0 +1,4 @@
|
||||
|
||||
@file:ScriptFileLocation("scriptFileLocation")
|
||||
|
||||
__FILE__.absolutePath
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
|
||||
@file:ScriptFileLocation("scriptFileLocation")
|
||||
|
||||
scriptFileLocation.absolutePath
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
|
||||
__FILE__.absolutePath
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
import java.io.File
|
||||
|
||||
fun getDependentScriptFile(): File {
|
||||
return __FILE__
|
||||
}
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
|
||||
val __FILE__ = "success"
|
||||
__FILE__
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
@file:Import("script-file-location-helper-imported-file.main.kts")
|
||||
|
||||
arrayOf(__FILE__.absolutePath, getDependentScriptFile().absolutePath)
|
||||
|
||||
Reference in New Issue
Block a user