merge

fun merge(classpath: List<File>, owners: Map<String, String>, serviceName: String?, defaultServiceName: String, serviceVersion: String?, output: File, warn: Consumer<String> = Consumer {}): Int

Assembles the fragments found in the classpath entries into output as the node does at startup (ManifestAssembly), each named after its entry's owner in owners (a project or a module, by the entry's path), describing the service serviceOf names: the one the contracts of its contexts and its own serviceName agree on; fails on a conflict, on a schema reference no fragment resolves, on another context's event a handler takes whose aggregate the peer contracts on the classpath do not say (PeerSources, naming the entry its class is in), on a contract whose classes its types lack (ContractClasses), on a command a saga derives or calls by its class that neither a context of the service nor a peer contract on the classpath decides, or a call of a system command or of a command of the service's own context (untakenCommands), or on two fragments of one name (fragmentsOf). A peer contract holding a value this version does not know, from a peer on the next minor version, is read as a node reads it, and what it leaves out is told to warn (ManifestJson.contract). Returns the number of fragments merged.