ManifestJson

Reads and writes Manifests as JSON text, and finds the fragments on a classpath.

Functions

Link copied to clipboard
fun contract(entry: File, warn: (String) -> Unit): ManifestFragment?

The peer contract (META-INF/wow/contract.json) of entry, a directory or a jar; null if none. A peer's api jar may come from the next minor version of Wow, as services on adjacent minors use each other's contract jars, so the contract is read as a node reads it (me.ahoo.wow.manifest.ClassPathContracts): a value of an enumeration this reader does not know leaves out what it belongs to, and is told to warn, naming the contract.

Link copied to clipboard

The fragments under META-INF/wow/manifest/ of entry, a directory or a jar of a classpath, at any depth (a nested project's is in a directory of its path), sorted by path; each is named by where it was found.

Link copied to clipboard

The model providers entry, a directory or a jar, registers for ServiceLoader: the class names its Manifest.MODEL_PROVIDERS lists, which the compiler writes beside a fragment.

Link copied to clipboard
fun pretty(tree: Any?): String

tree, a JSON tree of maps, lists and scalars, as indented JSON text.

Link copied to clipboard
fun read(file: File): Manifest

The Manifest input holds, one this build or an earlier one wrote: never newer than its reader (ManifestTree.REFUSE).

Link copied to clipboard
fun write(manifest: Manifest, file: File)