Launch the JavaFX 2 project shell on Java 25 with an interactive viewport, managed Play lifecycle and project mutation guards. Preserve headless/MCP and save compatibility, and qualify exact runtime executable bundles. Separate unit JaCoCo gates from opt-in integration suites and use the internal Pong fixture for the headless visual pilot. Move maintenance and native conformance tools into tooling; retain the VS Code extension and update current navigation links. Validation: tooling make verify passed, including 1064 Studio unit tests, JaCoCo thresholds and 22 headless integration tests.
105 lines
5.3 KiB
Java
105 lines
5.3 KiB
Java
package p.studio.architecture;
|
|
|
|
import com.tngtech.archunit.core.importer.ImportOption;
|
|
import com.tngtech.archunit.junit.AnalyzeClasses;
|
|
import com.tngtech.archunit.junit.ArchTest;
|
|
import com.tngtech.archunit.lang.ArchRule;
|
|
|
|
import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses;
|
|
|
|
@AnalyzeClasses(packages = {"p.studio", "p.packer", "p.animation"}, importOptions = ImportOption.DoNotIncludeTests.class)
|
|
class StudioBoundaryArchTest {
|
|
@ArchTest
|
|
static final ArchRule animationModelIsNeutral = noClasses()
|
|
.that().resideInAPackage("p.animation..")
|
|
.should().dependOnClassesThat().resideInAnyPackage(
|
|
"p.studio..", "p.packer..", "javafx..", "org.springframework..")
|
|
.because("DEC-0084 shares authoring DTOs and validation without a provider or UI dependency");
|
|
|
|
@ArchTest
|
|
static final ArchRule automationTransportStaysInTheApp = noClasses()
|
|
.that().resideInAnyPackage("p.studio.api..", "p.studio.core..", "p.studio.ui..")
|
|
.should().dependOnClassesThat().resideInAnyPackage(
|
|
"p.studio.app.mcp..", "p.studio.app.lsp..", "org.eclipse.lsp4j..", "com.sun.net.httpserver..", "io.modelcontextprotocol..")
|
|
.because("DEC-0060 confines MCP and HTTP transport to application adapters");
|
|
|
|
@ArchTest
|
|
static final ArchRule staticContainerCannotReturn = noClasses()
|
|
.that().resideInAnyPackage("p.studio..")
|
|
.should().haveSimpleName("Container")
|
|
.because("DEC-0059 requires the static service locator to be physically absent");
|
|
|
|
@ArchTest
|
|
static final ArchRule appContainerCompatibilityBridgeCannotReturn = noClasses()
|
|
.that().resideInAnyPackage("p.studio..")
|
|
.should().haveSimpleName("AppContainer")
|
|
.because("DEC-0059 requires Spring composition without a legacy service bag");
|
|
|
|
@ArchTest
|
|
static final ArchRule studioApiIsFrameworkAndProviderNeutral = noClasses()
|
|
.that().resideInAPackage("p.studio.api..")
|
|
.should().dependOnClassesThat().resideInAnyPackage(
|
|
"javafx..",
|
|
"org.springframework..",
|
|
"org.springframework.modulith..",
|
|
"p.packer..",
|
|
"p.studio.compiler..",
|
|
"p.studio.lsp..",
|
|
"p.studio.utilities..",
|
|
"p.studio.core..",
|
|
"p.studio.ui..")
|
|
.because("DEC-0059 requires a toolkit and provider neutral public Studio API");
|
|
|
|
@ArchTest
|
|
static final ArchRule studioCoreDoesNotDependOnJavaFx = noClasses()
|
|
.that().resideInAPackage("p.studio.core..")
|
|
.should().dependOnClassesThat().resideInAPackage("javafx..")
|
|
.because("DEC-0059 requires the Studio Core to compile without JavaFX");
|
|
|
|
@ArchTest
|
|
static final ArchRule studioCoreDoesNotDependOnSpring = noClasses()
|
|
.that().resideInAPackage("p.studio.core..")
|
|
.should().dependOnClassesThat().resideInAPackage("org.springframework..")
|
|
.because("DEC-0059 confines Spring to application composition and keeps core as constructor-injected POJOs");
|
|
|
|
@ArchTest
|
|
static final ArchRule studioCoreDoesNotDependOnLegacySharedInfrastructure = noClasses()
|
|
.that().resideInAPackage("p.studio.core..")
|
|
.should().dependOnClassesThat().resideInAPackage("p.studio.utilities..")
|
|
.because("DEC-0059 requires the extracted core to own explicit contracts instead of inheriting the mixed Studio utility classpath");
|
|
|
|
@ArchTest
|
|
static final ArchRule javaFxAdapterDoesNotDependOnCoreOrProviderImplementations = noClasses()
|
|
.that().resideInAnyPackage("p.studio.ui.javafx..", "p.studio.ui.javafx2..")
|
|
.should().dependOnClassesThat().resideInAnyPackage(
|
|
"p.studio.core..",
|
|
"p.packer..",
|
|
"p.studio.compiler..",
|
|
"p.studio.lsp..",
|
|
"p.studio.utilities..")
|
|
.because("DEC-0059 requires JavaFX to consume Studio API contracts only");
|
|
|
|
@ArchTest
|
|
static final ArchRule javaFxAdapterDoesNotOrchestrateTheFileSystem = noClasses()
|
|
.that().resideInAnyPackage("p.studio.ui.javafx..", "p.studio.ui.javafx2..")
|
|
.should().dependOnClassesThat().haveFullyQualifiedName("java.nio.file.Files")
|
|
.because("DEC-0059 keeps filesystem orchestration behind neutral Studio services");
|
|
|
|
@ArchTest
|
|
static final ArchRule javaFxAdapterDoesNotOwnSerialization = noClasses()
|
|
.that().resideInAnyPackage("p.studio.ui.javafx..", "p.studio.ui.javafx2..")
|
|
.should().dependOnClassesThat().resideInAPackage("com.fasterxml.jackson..")
|
|
.because("DEC-0059 keeps serialization in core or application adapters, not visual controls");
|
|
|
|
@ArchTest
|
|
static final ArchRule packerDoesNotDependOnStudio = noClasses()
|
|
.that().resideInAPackage("p.packer..")
|
|
.should().dependOnClassesThat().resideInAnyPackage(
|
|
"p.studio.api..",
|
|
"p.studio.core..",
|
|
"p.studio.ui..",
|
|
"p.studio.ui.javafx.window..",
|
|
"p.studio.ui.javafx.workspaces..")
|
|
.because("DEC-0059 keeps p.packer autonomous and dependency direction Studio to Packer");
|
|
}
|