WowApiPlugin
me.ahoo.wow.api: builds a context's api module (ApiRole.api), the commands, events and value classes another service depends on, with the peer contract and the code generated from it. The module declares the domain modules whose contracts it carries, dependencies { wowContract(project(":shop-domain")) }, and
becomes a
java-library, withapi(platform("me.ahoo.wow:wow-bom:<plugin version>"))andapi("me.ahoo.wow:wow-api"), the latter unless it declareswow-apiitself;holds its types alone in its own variants and jar, which every module compiles against: its domain modules compile without waiting for their contract, and another context's domain without waiting for this one's;
assembles
META-INF/wow/contract.json(AssembleContract): the contexts of those contracts whose command and event classes are all its own; a declared domain module of no contract fails it, naming the module;with the Kotlin JVM plugin, compiles
<package>.<Context>Contractper context and<State>Viewper published state from that contract (GenerateContractSources, source set WowPlugin.CONTRACT_SOURCE_SET);offers both in its contract jar (WowPlugin.CONTRACT_JAR_TASK), its feature
contract(capability<group>:<name>-contract, ContractRole): a module that uses the generated code asks for it withwow.contract(...), and a service, and the tests, see every api's contract;tells the domain modules it declares, in-build, that it pairs with them (
wowPairingElements).
An api module of no declared domain module is a library of types: it offers no contract and generates nothing.