Use the same 'package' field in manifest as in .def-file.

Eliminate pkg.
Use explicit 'interop = true' clause to distingush interop libraries.
This commit is contained in:
Alexander Gorshenev
2017-10-13 14:41:07 +03:00
committed by alexander-gorshenev
parent 9d8663a4fa
commit 6cab9a1038
3 changed files with 23 additions and 3 deletions
@@ -39,7 +39,9 @@ interface InteropLibrary {
}
fun createInteropLibrary(reader: KonanLibraryReader): InteropLibrary? {
val pkg = reader.manifestProperties.getProperty("pkg") ?: return null
if (reader.manifestProperties.getProperty("interop") != "true") return null
val pkg = reader.manifestProperties.getProperty("package")
?: error("Inconsistent manifest: interop library ${reader.libraryName} should have `package` specified")
val exportForwardDeclarations = reader.manifestProperties
.getProperty("exportForwardDeclarations").split(' ')
.map { it.trim() }.filter { it.isNotEmpty() }