Implement API to get source roots of script dependencies in KotlinScriptConfigurationManager and KotlinScriptConfigurationManager

This commit is contained in:
Pavel V. Talanov
2016-06-16 18:51:19 +03:00
parent ae61767bc7
commit 1da3efea81
2 changed files with 31 additions and 3 deletions
@@ -126,6 +126,10 @@ class KotlinScriptExternalImportsProvider(val project: Project, private val scri
cache.values.flatMap { it.classpath }
}.distinct()
fun getKnownSourceRoots(): List<File> = cacheLock.read {
cache.values.flatMap { it.sources }
}.distinct()
fun <TF> getCombinedClasspathFor(files: Iterable<TF>): List<File> =
getExternalImports(files)
.flatMap { it.classpath }