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;assembles
META-INF/wow/contract.jsoninto its jar (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), which its classes, jar and sources jar carry;offers each declared domain module a core view of itself, a jar of its own classes without that code, which the domain compiles against (attribute WowPlugin.API_VIEW, a variant named after the domain's path): the domain's contract comes from compiling the domain, so the domain cannot wait for the code generated from it.
An api module of no declared domain module carries no contract and generates nothing.