Implement class finder for customized scripts resolving - not yet completely functional

This commit is contained in:
Ilya Chernikov
2016-06-01 14:07:13 +02:00
parent b63ed0f4aa
commit 3e17724e58
11 changed files with 190 additions and 35 deletions
@@ -67,6 +67,13 @@ class ReflectedSuperclassWithParamsTestScriptDefinition(extension: String,
superclassParameters.map { it.name }
}
class StandardWithClasspathScriptDefinition(extension: String, classpath: List<String>? = null)
: BaseScriptDefinition(extension, classpath)
{
override fun getScriptParameters(scriptDescriptor: ScriptDescriptor) =
StandardScriptDefinition.getScriptParameters(scriptDescriptor)
}
fun classpathFromProperty(): List<String> =
System.getProperty("java.class.path")?.let {
it.split(String.format("\\%s", File.pathSeparatorChar).toRegex()).dropLastWhile { it.isEmpty() }.toTypedArray()