[K/N] Fixed resolve order of compiler caches
#KT-56611 Fixed
This commit is contained in:
+7
-7
@@ -175,16 +175,16 @@ class CachedLibraries(
|
|||||||
?: error("No cache found for library ${library.libraryName} at $explicitPath")
|
?: error("No cache found for library ${library.libraryName} at $explicitPath")
|
||||||
} else {
|
} else {
|
||||||
val libraryPath = library.libraryFile.absolutePath
|
val libraryPath = library.libraryFile.absolutePath
|
||||||
if (autoCacheableFrom.any { libraryPath.startsWith(it.absolutePath) }) {
|
implicitCacheDirectories.firstNotNullOfOrNull { dir ->
|
||||||
val dir = computeVersionedCacheDirectory(autoCacheDirectory, library, uniqueNameToLibrary)
|
|
||||||
selectCache(library, dir.child(getPerFileCachedLibraryName(library)))
|
selectCache(library, dir.child(getPerFileCachedLibraryName(library)))
|
||||||
?: selectCache(library, dir.child(getCachedLibraryName(library)))
|
?: selectCache(library, dir.child(getCachedLibraryName(library)))
|
||||||
} else {
|
|
||||||
implicitCacheDirectories.firstNotNullOfOrNull { dir ->
|
|
||||||
selectCache(library, dir.child(getPerFileCachedLibraryName(library)))
|
|
||||||
?: selectCache(library, dir.child(getCachedLibraryName(library)))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
?: autoCacheDirectory.takeIf { autoCacheableFrom.any { libraryPath.startsWith(it.absolutePath) } }
|
||||||
|
?.let {
|
||||||
|
val dir = computeVersionedCacheDirectory(it, library, uniqueNameToLibrary)
|
||||||
|
selectCache(library, dir.child(getPerFileCachedLibraryName(library)))
|
||||||
|
?: selectCache(library, dir.child(getCachedLibraryName(library)))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cache?.let { library to it }
|
cache?.let { library to it }
|
||||||
|
|||||||
Reference in New Issue
Block a user