Eliminate duplicates of libraries acquired by rombic inclusions.

Allow repositories without /klib bottom level firectory.
This commit is contained in:
Alexander Gorshenev
2017-10-03 14:53:59 +03:00
committed by alexander-gorshenev
parent 42cbf8428b
commit b7dd5bd24d
2 changed files with 2 additions and 1 deletions
@@ -104,6 +104,7 @@ class KonanConfig(val project: Project, val configuration: CompilerConfiguration
.map { it.dependencies } .flatten()
.map { resolver.resolve(it) }
.map { LibraryReaderImpl(it, currentAbiVersion, targetManager.target) }
.distinctBy { it.libraryFile.absolutePath }
val newDependencies = dependencies.deleteMatching(result, { it.libraryFile.absolutePath })
result.addAll(newDependencies)
@@ -39,7 +39,7 @@ class KonanLibrarySearchPathResolver(repositories: List<String>,
get() = if (!skipCurrentDir) File.userDir else null
private val repoRoots: List<File> by lazy {
repositories.map{File(it).klib}
repositories.map{File(it)}
}
// This is the place where we specify the order of library search.