plugins { id 'ca.architecture' // Every strict lane of this build belongs to a stage a workflow executes, checked here exactly // as in the main build: the main build's check cannot see this build's lanes, and while only it // applied the plugin, grpcPerformanceTest ran nowhere (review 2026-11-03 RR-06-03). id 'ca.strict-lane-stages' } // No `ca.release-provenance` any more: each gRPC leaf's `ca.java-conventions` derives its version // and `sourceRevision` from the same -PreleaseVersion/-PgitRevision (GIT_SHA, GITHUB_SHA) inputs the // main build reads, so one commit produces one version scheme in both builds (review BUILD-O3-5). tasks.register('resolveAndLockAll') { group = 'build setup' description = 'Regenerates dependency locks for every optional gRPC leaf (requires --write-locks).' dependsOn subprojects.findAll { it.childProjects.isEmpty() }.collect { "${it.path}:resolveAndLockAll" } } tasks.register('checkAll') { group = 'verification' description = 'Runs every gRPC optional-platform leaf check.' dependsOn subprojects.findAll { it.childProjects.isEmpty() }.collect { "${it.path}:check" } } tasks.register('qualityCheck') { group = 'verification' description = 'Runs production-bytecode static analysis for every optional-platform leaf.' dependsOn subprojects.findAll { it.childProjects.isEmpty() }.collect { "${it.path}:qualityCheck" } } // SpotBugs + FindSecBugs over the test source sets (config/spotbugs/exclude-test.xml). This build has // no main stage, and the run is short (eleven tasks), so it joins `ci`. tasks.register('testQualityCheck') { group = 'verification' description = 'Runs test-code static analysis for every optional-platform leaf.' dependsOn subprojects.findAll { it.childProjects.isEmpty() }.collect { "${it.path}:testQualityCheck" } } tasks.register('ci') { group = 'verification' description = 'Runs the optional gRPC platform verification surface.' dependsOn tasks.named('checkAll') dependsOn tasks.named('qualityCheck') dependsOn tasks.named('testQualityCheck') // architectureCheck, not only the direction gate: it also runs verifyNoIgnoredSourcePackages, so // a gRPC source Git would drop fails this build's ci the way it fails the main build's. dependsOn tasks.named('architectureCheck') } // A strict integration lane that no workflow invokes is not coverage; it is a file that looks like // coverage. `grpc-operation-ledger-jpa` declares a Testcontainers PostgreSQL lane that certifies the // atomic `INSERT ... ON CONFLICT DO NOTHING` claim the whole durable-idempotency contract rests on, // and until this aggregate existed `ci` reached `checkAll`, `qualityCheck` and the dependency // verifier only — none of which runs a lane whose category is INTEGRATION. // // Kept out of `ci`: every lane here starts a container, and `ci` is the per-PR gate for this build. // The caller is integration-main.yml, the stage that owns container-backed lanes. tasks.register('integrationCheck') { group = 'verification' description = 'Runs every optional-platform leaf integration test lane. Needs a container runtime.' dependsOn subprojects.findAll { it.childProjects.isEmpty() }.collect { "${it.path}:integrationTestLaneCheck" } } // The performance stage of this build: grpcPerformanceTest. It asserts the shape of a measurement // (ordered percentiles, a gate that reads them) with a generous budget, not a number, so it can run // on a shared runner. integration-main.yml's performance-check job runs it next to the main build's // `:performanceCheck`; before this aggregate it ran when somebody asked for it by name, which was // nobody (review 2026-11-03 RR-06-03). tasks.register('performanceCheck') { group = 'verification' description = 'Runs every optional-platform leaf performance test lane.' dependsOn subprojects.findAll { it.childProjects.isEmpty() }.collect { "${it.path}:performanceTestLaneCheck" } } // The tag-only stage of this build: the hermetic strict lanes (the three gRPC certification lanes). // Their tests already run inside each leaf's `test`; the lanes add the one thing `test` cannot say — // that a tag still selects something — which is worth asserting once per release tag. release.yml // runs this aggregate instead of naming the lanes, so a lane added here is in the release gate // without a workflow edit. tasks.register('releaseCheck') { group = 'verification' description = 'Runs every optional-platform leaf hermetic strict test lane (the release gate).' dependsOn subprojects.findAll { it.childProjects.isEmpty() }.collect { "${it.path}:testLaneCheck" } } // The stages this build's strict lanes may belong to, executed by workflows as // `./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') }