Change manifest 'dependencies' field for 'depends'.

To reduce user confusion on reading manifests.
This commit is contained in:
Alexander Gorshenev
2017-10-13 14:55:25 +03:00
committed by alexander-gorshenev
parent 6cab9a1038
commit e84ab4abfe
2 changed files with 7 additions and 3 deletions
@@ -69,7 +69,7 @@ class LibraryReaderImpl(var libraryFile: File, val currentAbiVersion: Int,
get() = manifestProperties.propertyList("linkerOpts", target!!.detailedName)
override val unresolvedDependencies: List<String>
get() = manifestProperties.propertyList("dependencies")
get() = manifestProperties.propertyList("depends")
val resolvedDependencies = mutableListOf<LibraryReaderImpl>()
@@ -86,8 +86,12 @@ class LibraryWriterImpl(override val libDir: File, moduleName: String, currentAb
}
override fun addLinkDependencies(libraries: List<KonanLibraryReader>) {
if (libraries.isEmpty()) return
manifestProperties.setProperty("dependencies", libraries .map { it.uniqueName } . joinToString(" "))
if (libraries.isEmpty()) {
// make sure there are not leftovers from the .def file.
manifestProperties.remove("depends")
} else {
manifestProperties.setProperty("depends", libraries .map { it.uniqueName } . joinToString(" "))
}
}
override fun addManifestAddend(path: String) {