Use cache everywhere where K/N KLIBs are read in IDE
This commit is contained in:
committed by
alexander-gorshenev
parent
185b10fa06
commit
781c73335d
@@ -49,9 +49,7 @@ val BaseKotlinLibrary.uniqueName: String
|
||||
|
||||
val BaseKotlinLibrary.unresolvedDependencies: List<UnresolvedLibrary>
|
||||
get() = manifestProperties.propertyList(KLIB_PROPERTY_DEPENDS, escapeInQuotes = true)
|
||||
.map {
|
||||
UnresolvedLibrary(it, manifestProperties.getProperty("dependency_version_$it"))
|
||||
}
|
||||
.map { UnresolvedLibrary(it, manifestProperties.getProperty("dependency_version_$it")) }
|
||||
|
||||
interface KotlinLibrary : BaseKotlinLibrary, MetadataLibrary, IrLibrary
|
||||
|
||||
@@ -60,11 +58,11 @@ val KotlinLibrary.isInterop
|
||||
get() = manifestProperties.getProperty(KLIB_PROPERTY_INTEROP) == "true"
|
||||
|
||||
val KotlinLibrary.packageFqName: String?
|
||||
get() = manifestProperties.getProperty(org.jetbrains.kotlin.library.KLIB_PROPERTY_PACKAGE)
|
||||
get() = manifestProperties.getProperty(KLIB_PROPERTY_PACKAGE)
|
||||
|
||||
val KotlinLibrary.exportForwardDeclarations
|
||||
get() = manifestProperties.propertyList(KLIB_PROPERTY_EXPORT_FORWARD_DECLARATIONS, escapeInQuotes = true)
|
||||
.asSequence()
|
||||
.map { it.trim() }
|
||||
.filter { it.isNotEmpty() }
|
||||
.toList()
|
||||
.toList()
|
||||
|
||||
@@ -19,6 +19,9 @@ package org.jetbrains.kotlin.library
|
||||
import org.jetbrains.kotlin.konan.file.File
|
||||
import org.jetbrains.kotlin.library.KLIB_METADATA_FILE_EXTENSION_WITH_DOT
|
||||
|
||||
const val KLIB_MANIFEST_FILE_NAME = "manifest"
|
||||
const val KLIB_MODULE_METADATA_FILE_NAME = "module"
|
||||
|
||||
/**
|
||||
* This scheme describes the Kotlin/Native Library (KLIB) layout.
|
||||
*/
|
||||
@@ -27,7 +30,7 @@ interface KotlinLibraryLayout {
|
||||
val libraryName: String
|
||||
get() = libDir.path
|
||||
val manifestFile
|
||||
get() = File(libDir, "manifest")
|
||||
get() = File(libDir, KLIB_MANIFEST_FILE_NAME)
|
||||
val resourcesDir
|
||||
get() = File(libDir, "resources")
|
||||
}
|
||||
@@ -36,7 +39,7 @@ interface MetadataKotlinLibraryLayout : KotlinLibraryLayout {
|
||||
val metadataDir
|
||||
get() = File(libDir, "linkdata")
|
||||
val moduleHeaderFile
|
||||
get() = File(metadataDir, "module")
|
||||
get() = File(metadataDir, KLIB_MODULE_METADATA_FILE_NAME)
|
||||
|
||||
fun packageFragmentsDir(packageName: String) =
|
||||
File(metadataDir, if (packageName == "") "root_package" else "package_$packageName")
|
||||
|
||||
Reference in New Issue
Block a user