diff --git a/README.md b/README.md index cd6ddeb..e6bce65 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ registry entries with `"build": "optional-grpc"`) are kept out of the main multi internal project dependencies while making their configuration opt-in. ```bash -./gradlew -p optional-platforms ci -./gradlew -p optional-platforms :grpc:grpc-testkit:grpcInProcessContractTest +./gradlew -p platforms/optional-build ci +./gradlew -p platforms/optional-build :grpc:grpc-testkit:grpcInProcessContractTest ``` `adapter:inbound:grpc` remains in the main application build because it is an application adapter; diff --git a/build.gradle b/build.gradle index c73bdc2..9a2eb59 100644 --- a/build.gradle +++ b/build.gradle @@ -84,9 +84,9 @@ tasks.register('releaseCheck') { } // The stages this build's strict lanes may belong to, executed by workflows as -// `./gradlew -p optional-platforms ` from `src`. A command counts when it starts in this +// `./gradlew -p platforms/optional-build ` from `src`. A command counts when it starts in this // directory (working-directory joined with -p), which the plugin reads from where this build is. strictLaneStages { stage ':ci', ':integrationCheck', ':performanceCheck', ':releaseCheck' - workflowDirectory = layout.projectDirectory.dir('../../.github/workflows') + workflowDirectory = layout.projectDirectory.dir('../../../.github/workflows') } diff --git a/gradle.properties b/gradle.properties index 0d1f586..cabb814 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -# optional-platforms is a build of its own (`./gradlew -p optional-platforms ...`), and Gradle reads +# optional-platforms is a build of its own (`./gradlew -p platforms/optional-build ...`), and Gradle reads # gradle.properties from the build's root directory only, so src/gradle.properties never reached it: # the optional build ran serially and without the build cache (review 2026-11-01 08-06). # The values and their reasons are src/gradle.properties'. settings.gradle fails the build when the diff --git a/grpc/CLAUDE.md b/grpc/CLAUDE.md index dbaaccd..39ec887 100644 --- a/grpc/CLAUDE.md +++ b/grpc/CLAUDE.md @@ -1,7 +1,7 @@ # grpc — local authority for the gRPC platform family 이 문서는 `grpc:*` family의 **local authority**다. gRPC platform은 기본 application build와 분리된 -`src/optional-platforms` build가 소유한다. 여기서 정하는 것은 family별 framework 규칙, 증거 등급, +`src/platforms/optional-build` build가 소유한다. 여기서 정하는 것은 family별 framework 규칙, 증거 등급, Stable 범위의 경계와 application에 채택될 때 필요한 계약이다. Root 정책(`CLAUDE.md` / `AGENTS.md`)과 충돌하면 root가 이긴다. @@ -11,7 +11,7 @@ Root 정책(`CLAUDE.md` / `AGENTS.md`)과 충돌하면 root가 이긴다. `adapter:inbound:grpc`를 통해 라이브러리로서 도달한다. 설계 근거와 원본 계획 대비 deviation은 -[docs/superpowers/specs/2026-08-30-grpc-platform-adaptation-design.md](../../docs/superpowers/specs/2026-08-30-grpc-platform-adaptation-design.md)가 SSOT다. +[docs/superpowers/specs/2026-08-30-grpc-platform-adaptation-design.md](../../../docs/superpowers/specs/2026-08-30-grpc-platform-adaptation-design.md)가 SSOT다. ## Family와 framework 규칙 @@ -86,7 +86,7 @@ capability flag 뒤에 있다. `GrpcPlatformStartupValidator`가 Stable catalog `grpc:*`와 `grpc-advanced:*`는 기본 `ca-skeleton` settings에 include되지 않는다. 따라서 일반 `:app-bootstrap:build`는 이 project들을 configure하지 않는다(목록은 registry의 `"build": "optional-grpc"`). 플랫폼 자체는 -`./gradlew -p optional-platforms ci`로 검증하고, application runtime에 실제 채택하려면 composition root가 +`./gradlew -p platforms/optional-build ci`로 검증하고, application runtime에 실제 채택하려면 composition root가 명시적으로 dependency를 가져오는 별도 변경이 필요하다. 런타임 포함 여부와 qualification은 별개다. in-process·Netty·fault lane이 통과해도 실제 배포 환경의 @@ -115,11 +115,11 @@ focused test는 registry의 `gradle_path`에서 파생한다. ```bash cd src -./gradlew -p optional-platforms :grpc::test --console=plain -./gradlew -p optional-platforms :grpc:grpc-testkit:grpcInProcessContractTest --console=plain -./gradlew -p optional-platforms :grpc:grpc-testkit:grpcNettyContractTest --console=plain -./gradlew -p optional-platforms :grpc:grpc-testkit:grpcFaultTest --console=plain -./gradlew -p optional-platforms :grpc:grpc-testkit:grpcPerformanceTest --console=plain +./gradlew -p platforms/optional-build :grpc::test --console=plain +./gradlew -p platforms/optional-build :grpc:grpc-testkit:grpcInProcessContractTest --console=plain +./gradlew -p platforms/optional-build :grpc:grpc-testkit:grpcNettyContractTest --console=plain +./gradlew -p platforms/optional-build :grpc:grpc-testkit:grpcFaultTest --console=plain +./gradlew -p platforms/optional-build :grpc:grpc-testkit:grpcPerformanceTest --console=plain ``` ## 금지 diff --git a/grpc/grpc-contract/buf.yaml b/grpc/grpc-contract/buf.yaml index 5565f6e..d81d5f1 100644 --- a/grpc/grpc-contract/buf.yaml +++ b/grpc/grpc-contract/buf.yaml @@ -4,9 +4,9 @@ # build.gradle) owns compilation. CI runs both `buf lint` and `buf breaking` from this directory — # see the `grpc-proto-buf` job in .github/workflows/ci-quality-gates.yml. # -# cd src/grpc/grpc-contract +# cd src/platforms/grpc/grpc-contract # buf lint -# buf breaking --against '#subdir=src/grpc/grpc-contract' +# buf breaking --against '#subdir=src/platforms/grpc/grpc-contract' # # No dependencies: the only imports are protoc's own well-known types (google/protobuf/*.proto). version: v2 diff --git a/grpc/grpc-operation-ledger-jpa/build.gradle b/grpc/grpc-operation-ledger-jpa/build.gradle index e4a8fc3..6a83f77 100644 --- a/grpc/grpc-operation-ledger-jpa/build.gradle +++ b/grpc/grpc-operation-ledger-jpa/build.gradle @@ -27,7 +27,7 @@ configurations { // dependency on the main build (it would pull the whole main build into this one), and a test that // compares two copies (two definitions stay, and the test would have to parse Java source text). def sharedMigrationFileSources = tasks.register('sharedMigrationFileSources', Sync) { - from(file('../../adapter/outbound/persistence-jpa/src/testFixtures/java')) { + from(file('../../../adapter/outbound/persistence-jpa/src/testFixtures/java')) { include 'dev/caskeleton/adapter/outbound/persistence/testkit/migration/VersionedMigrationFiles.java' include 'dev/caskeleton/adapter/outbound/persistence/testkit/migration/ConcurrentIndexMigrationInspector.java' include 'dev/caskeleton/adapter/outbound/persistence/testkit/migration/MigrationResource.java' diff --git a/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcPackageOwnershipTest.java b/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcPackageOwnershipTest.java index a5f460c..706fc1b 100644 --- a/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcPackageOwnershipTest.java +++ b/grpc/grpc-testkit/src/test/java/dev/caskeleton/grpc/testkit/GrpcPackageOwnershipTest.java @@ -20,7 +20,7 @@ class GrpcPackageOwnershipTest { List leaves = List.of("grpc-core-api", "grpc-runtime", "grpc-operation-ledger-jpa"); Map> owners = new LinkedHashMap<>(); for (String leaf : leaves) { - Path source = repo.resolve("src/grpc").resolve(leaf).resolve("src/main/java"); + Path source = repo.resolve("src/platforms/grpc").resolve(leaf).resolve("src/main/java"); try (var files = Files.walk(source)) { for (Path file : files.filter(path -> path.toString().endsWith(".java")).toList()) { var matcher = PACKAGE.matcher(Files.readString(file)); diff --git a/settings.gradle b/settings.gradle index a34cfb8..bec7702 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,5 +1,5 @@ pluginManagement { - includeBuild('../build-logic') + includeBuild('../../build-logic') } plugins { @@ -13,7 +13,7 @@ dependencyResolutionManagement { } versionCatalogs { libs { - from(files('../gradle/libs.versions.toml')) + from(files('../../gradle/libs.versions.toml')) } } } @@ -28,9 +28,9 @@ def readBuildProperties = { File file -> file.withInputStream { properties.load(it) } properties } -def mainBuildProperties = readBuildProperties(new File(settingsDir, '../gradle.properties')) +def mainBuildProperties = readBuildProperties(new File(settingsDir, '../../gradle.properties')) def ownBuildProperties = readBuildProperties(new File(settingsDir, 'gradle.properties')) if (mainBuildProperties != ownBuildProperties) { - throw new GradleException("optional-platforms/gradle.properties differs from src/gradle.properties: " + + throw new GradleException("platforms/optional-build/gradle.properties differs from src/gradle.properties: " + "${ownBuildProperties} vs ${mainBuildProperties}. Copy the main build's values.") }