S8StackBuilder
com.s8.meta.build.S8StackBuilder
Top-level builder. You pass a context and one or more required target names. It queues those modules plus their dependencies and builds until the graph is stable (or 8192 steps, which is treated as a circular-dependency error).
Constructor
- S8StackBuilder(context, requiredTargetNames…)
- S8StackBuilder(S8BuildContext context, String... requiredTargetNames)
- build()
- Run the queue. void build() throws IOException, S8CmdException, S8BuildException
BuildPolicy
FORCE_REBUILD— build if the module has DEV sources and has not been built in this run.LAZY_BUILD— build only if the prod classes folder is missing.
A module is buildable when every dependency the policy requires is already built (or already has prod classes — binary-only deps are allowed).
Example
S8BuildContext context = new S8BuildContext(BuildPolicy.FORCE_REBUILD);
new S8StackBuilder(context, "S8-pkgs-ui-aloe").build();
BashGenerator can then write PROD/TARGET/TARGET_exec.sh:
java --module-path "$MODULE_PATH" --module "$MAIN_MODULE/$MAIN_CLASS" "$1"