Skip to content

chore(services): consume the client-protocol artifacts from Maven Central - #1325

Merged
bmc08gt merged 5 commits into
code/cashfrom
chore/ocp-client-protocol-consumer
Aug 25, 2026
Merged

chore(services): consume the client-protocol artifacts from Maven Central#1325
bmc08gt merged 5 commits into
code/cashfrom
chore/ocp-client-protocol-consumer

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

:services:opencode and :services:flipcash now depend on published packages instead of the
in-repo generated proto modules:

-implementation(project(":definitions:opencode:models"))
+implementation("com.flipcash:ocp-client-protocol:0.1.0")

-implementation(project(":definitions:flipcash:models"))
+implementation("com.flipcash:flipcash2-client-protocol:0.1.0")

Both artifacts are on Maven Central, generated by
ocp-client-protocol and
flipcash2-client-protocol from the
same upstream contracts this repo vendors today. Their generated Kotlin is byte-identical to what
:definitions:*:models produces — 263 files for OCP, 526 for Flipcash, checked per generator and
gated in each repo's CI. That equivalence is why this is a two-line change and not a migration.

Artifact coordinates and generated namespace are deliberately different. The packages publish
under com.flipcash; the code inside stays in com.codeinc.opencode.gen.* and
com.codeinc.flipcash.gen.*, which is set by java_package in the protos. No imports move.

Two dependencies that the app's graph used to supply incidentally are now declared by the
artifacts themselves: protovalidate-runtime and kotlinx-coroutines. The generated grpckt stubs
reference kotlinx.coroutines.flow.Flow, and a standalone artifact cannot rely on picking that up
from a consumer.

:definitions:opencode:models and :definitions:flipcash:models now have no consumers. They stay
in place here — removing them, along with the fetch-protos.sh machinery behind them, belongs in
its own change once iOS also consumes the packages.

Swaps :definitions:opencode:models for com.codeinc.opencode:ocp-client-protocol,
resolved from mavenLocal, to check that the generated client works as an external
dependency rather than an in-repo codegen module.

It does. :services:opencode compiles, its 603 unit tests pass, and the full debug
APK builds. protovalidate-runtime and kotlinx-coroutines-core now arrive transitively
from the artifact's POM instead of being declared here.

Proof of concept, not the migration: the :definitions:opencode modules are still in
settings.gradle.kts, and the version is a local snapshot that CI cannot resolve. Both
go away once ocp-client-protocol publishes for real.
Follows ocp-client-protocol publishing under com.flipcash instead of
com.codeinc.opencode. The imported package is unaffected.
Swaps :definitions:flipcash:models for com.flipcash:flipcash2-client-protocol,
resolved from mavenLocal, mirroring what :services:opencode already does.

It works the same way. :services:flipcash compiles, its 220 unit tests pass, and
the full debug APK builds with both services on artifacts. dependencyInsight
confirms genuine external-module resolution with :definitions:flipcash:models off
the classpath.

The swap is contained because every com.codeinc.flipcash.gen.* import in the app
lives under this module, and the dependency was already implementation, so nothing
downstream sees it.

Proof of concept, not the migration: the :definitions:flipcash modules are still in
settings.gradle.kts, and the version is a local snapshot that CI cannot resolve.
Both go away once flipcash2-client-protocol publishes for real.
ocp-client-protocol and flipcash2-client-protocol 0.1.0 are on Maven Central,
so the mavenLocal snapshots are no longer needed. Both modules build and pass
their unit tests against the published jars (603 opencode, 220 flipcash).
@github-actions github-actions Bot added type: chore Maintenance, config, CI/CD area: network gRPC, connectivity, API, exchange rates labels Aug 25, 2026
…alog

Every other external dependency in these modules comes from libs.versions.toml;
these two were the only hardcoded coordinates.
@github-actions github-actions Bot added the area: build-system Gradle, convention plugins, build-logic label Aug 25, 2026
@bmc08gt
bmc08gt merged commit 0086a36 into code/cash Aug 25, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the chore/ocp-client-protocol-consumer branch August 25, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build-system Gradle, convention plugins, build-logic area: network gRPC, connectivity, API, exchange rates type: chore Maintenance, config, CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant