jmvs

0002 Multi-module build with one-way dependencies

Status: Accepted

Context

The legacy app is a single module in which Java3D types leak into the plugin SPI, interaction and GUI (legacy arc42 ยง11.1). Only model and io are renderer-free, and nothing enforces that.

Decision

Split the build into Gradle modules:

Module Responsibility May depend on
jmvs-core Domain model, element table, bonding, structure readers ciftools-java
jmvs-scene Renderer-neutral scene data, display-mode and colour-scheme SPI, built-in modes jmvs-core
jmvs-render-gdx libGDX renderer, camera, picking jmvs-scene, libGDX
jmvs-app Launcher, UI, file handling, packaging all of the above, libGDX
legacy-app Legacy Java3D app; since cutover a separate, standalone build, not a module (0003) none of the above

Dependencies point one way: jmvs-app โ†’ jmvs-render-gdx โ†’ jmvs-scene โ†’ jmvs-core. Each module uses implementation dependencies by default and api only for types in its public signatures.

Alternatives considered

Consequences