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

Fix file dependency.

This commit is contained in:
Cedric Beust 2016-04-21 01:30:17 -08:00
parent 97ec031c52
commit 62ab568bfb

View file

@ -27,7 +27,12 @@ class DependencyManager @Inject constructor(val executors: KobaltExecutors, val
override fun create(id: String, project: Project?) : IClasspathDependency {
if (id.startsWith(FileDependency.PREFIX_FILE)) {
val path = if (project?.directory != null) {
File(project!!.directory, id.substring(FileDependency.PREFIX_FILE.length))
val idPath = id.substring(FileDependency.PREFIX_FILE.length)
if (! File(idPath).isAbsolute) {
File(project!!.directory, idPath)
} else {
File(idPath)
}
} else {
File(id.substring(FileDependency.PREFIX_FILE.length))
}