1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 00:17:11 -07:00

Surface the new build directories to expose them to the IDEA plug-in.

This commit is contained in:
Cedric Beust 2017-03-31 10:56:30 -07:00
parent a2e197959d
commit a6836fbd79
7 changed files with 32 additions and 18 deletions

View file

@ -128,5 +128,9 @@ class Kobalt {
fun addBuildSourceDirs(dirs: Array<out String>) {
buildSourceDirs.addAll(dirs)
}
fun cleanUp() {
buildSourceDirs.clear()
}
}
}

View file

@ -20,6 +20,8 @@ class BuildScriptInfo(val file: File, val fullBuildFile: List<String>, val secti
val includedBuildSourceDirs = arrayListOf<IncludedBuildSourceDir>()
fun addBuildSourceDir(dir: IncludedBuildSourceDir) = includedBuildSourceDirs.add(dir)
fun includedBuildSourceDirsForLine(line: Int): List<String> {
val result = includedBuildSourceDirs.find { it.line == line }?.dirs
return result ?: emptyList()