chore: 落地 eip4-platform 多模块骨架基线(PoC→工程化)
从 eip4-poc 迁入双层制模块化单体:保真层 platform-legacy-core (com.dsasp 引擎原样)+ 现代层 platform-metadata/auth/flow-gateway/ converter/ai + platform-app 启动器。ArchUnit 纪律固化(保真层禁依赖现代层)。 此为 C1 对拍工作的编译通过基线。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package com.eip4.platform.app;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 架构纪律(《eip4-platform架构设计》第一节,ArchUnit 固化):
|
||||
* com.eip4.* 可调 com.dsasp.*,反向禁止——保真层不得感知现代层。
|
||||
*/
|
||||
@AnalyzeClasses(packages = {"com.dsasp", "com.eip4"})
|
||||
class ArchitectureRulesTest {
|
||||
|
||||
@ArchTest
|
||||
static final ArchRule 保真层禁止依赖现代层 =
|
||||
noClasses().that().resideInAPackage("com.dsasp..")
|
||||
.should().dependOnClassesThat().resideInAPackage("com.eip4..")
|
||||
.because("双层制:移植的旧代码不重写、不感知新代码,保证与 framework 源码 diff 最小");
|
||||
}
|
||||
Reference in New Issue
Block a user