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

Relative compile dependencies should be resolved correctly.

Related to https://github.com/cbeust/kobalt-intellij-plugin/issues/24
This commit is contained in:
Cedric Beust 2016-05-06 01:13:02 -08:00
parent f100f9bd62
commit 268b9a400f
4 changed files with 38 additions and 2 deletions

View file

@ -73,6 +73,11 @@ public class BuildFileCompiler @Inject constructor(@Assisted("buildFiles") val b
val pluginUrls = parsedBuildFile.pluginUrls
val buildScriptJarFile = File(KFiles.findBuildScriptLocation(buildFile, SCRIPT_JAR))
//
// Save the current build script absolute directory
//
context.internalContext.absoluteDir = buildFile.absoluteDir
// If the script jar files were generated by a different version, wipe them in case the API
// changed in-between
buildScriptJarFile.parentFile.let { dir ->
@ -96,6 +101,10 @@ public class BuildFileCompiler @Inject constructor(@Assisted("buildFiles") val b
errorTaskResult = taskResult
}
}
// Clear the absolute dir
context.internalContext.absoluteDir = null
}
val pluginUrls = parsedBuildFiles.flatMap { it.pluginUrls }
return FindProjectResult(projects, pluginUrls, if (errorTaskResult != null) errorTaskResult!! else TaskResult())