From a0bfe6509759321833f28a1b1ba7400c750ae1b1 Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Tue, 25 Aug 2026 09:48:31 -0400 Subject: [PATCH 1/5] chore(opencode): consume the OCP protos as a published artifact 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. --- services/opencode/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/opencode/build.gradle.kts b/services/opencode/build.gradle.kts index e0eba2380..66abb9775 100644 --- a/services/opencode/build.gradle.kts +++ b/services/opencode/build.gradle.kts @@ -27,7 +27,7 @@ android { } dependencies { - implementation(project(":definitions:opencode:models")) + implementation("com.codeinc.opencode:ocp-client-protocol:0.1.0-SNAPSHOT") api(project(":libs:currency-math")) api(project(":libs:datetime")) api(project(":libs:encryption:base58")) From 98d4b81c21b4f6722bbbbdbb2f93256d670ffed8 Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Tue, 25 Aug 2026 09:58:20 -0400 Subject: [PATCH 2/5] chore(opencode): track the com.flipcash artifact coordinates Follows ocp-client-protocol publishing under com.flipcash instead of com.codeinc.opencode. The imported package is unaffected. --- services/opencode/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/opencode/build.gradle.kts b/services/opencode/build.gradle.kts index 66abb9775..cd9a3eb51 100644 --- a/services/opencode/build.gradle.kts +++ b/services/opencode/build.gradle.kts @@ -27,7 +27,7 @@ android { } dependencies { - implementation("com.codeinc.opencode:ocp-client-protocol:0.1.0-SNAPSHOT") + implementation("com.flipcash:ocp-client-protocol:0.1.0-SNAPSHOT") api(project(":libs:currency-math")) api(project(":libs:datetime")) api(project(":libs:encryption:base58")) From 9b507e76b5ab7ad826c1781d6d5e3b3ee7492e24 Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Tue, 25 Aug 2026 10:20:33 -0400 Subject: [PATCH 3/5] chore(flipcash): consume the Flipcash protos as a published artifact 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. --- services/flipcash/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/flipcash/build.gradle.kts b/services/flipcash/build.gradle.kts index 50199a10c..651ff5d85 100644 --- a/services/flipcash/build.gradle.kts +++ b/services/flipcash/build.gradle.kts @@ -24,7 +24,7 @@ android { } dependencies { - implementation(project(":definitions:flipcash:models")) + implementation("com.flipcash:flipcash2-client-protocol:0.1.0-SNAPSHOT") api(project(":libs:network:jwt")) api(project(":services:opencode")) implementation(project(":ui:resources")) From 5f9c0f99e410e518edf58033d7c0aca3695e34d0 Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Tue, 25 Aug 2026 11:36:48 -0400 Subject: [PATCH 4/5] chore(services): consume the released client-protocol artifacts 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). --- services/flipcash/build.gradle.kts | 2 +- services/opencode/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/flipcash/build.gradle.kts b/services/flipcash/build.gradle.kts index 651ff5d85..59b591828 100644 --- a/services/flipcash/build.gradle.kts +++ b/services/flipcash/build.gradle.kts @@ -24,7 +24,7 @@ android { } dependencies { - implementation("com.flipcash:flipcash2-client-protocol:0.1.0-SNAPSHOT") + implementation("com.flipcash:flipcash2-client-protocol:0.1.0") api(project(":libs:network:jwt")) api(project(":services:opencode")) implementation(project(":ui:resources")) diff --git a/services/opencode/build.gradle.kts b/services/opencode/build.gradle.kts index cd9a3eb51..ee243aab8 100644 --- a/services/opencode/build.gradle.kts +++ b/services/opencode/build.gradle.kts @@ -27,7 +27,7 @@ android { } dependencies { - implementation("com.flipcash:ocp-client-protocol:0.1.0-SNAPSHOT") + implementation("com.flipcash:ocp-client-protocol:0.1.0") api(project(":libs:currency-math")) api(project(":libs:datetime")) api(project(":libs:encryption:base58")) From 918a35b567f5ed55b5d03bc5d85b4d0ab44a19af Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Tue, 25 Aug 2026 11:46:03 -0400 Subject: [PATCH 5/5] chore(deps): declare the client-protocol artifacts in the version catalog Every other external dependency in these modules comes from libs.versions.toml; these two were the only hardcoded coordinates. --- gradle/libs.versions.toml | 8 ++++++++ services/flipcash/build.gradle.kts | 2 +- services/opencode/build.gradle.kts | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9d601cace..6c0655af9 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -64,6 +64,12 @@ protobuf = "4.35.1" protobuf-plugin = "0.10.0" protovalidate-kt = "0.1.1" +# Generated client SDKs for the two backend contracts. Separate versions on purpose: the +# protos are independent (flipcash2 does not import ocp), so the packages move on their own +# cadence and there is nothing to keep aligned. +ocp-client-protocol = "0.1.0" +flipcash2-client-protocol = "0.1.0" + # The Android port is the ONLY libphonenumber this app depends on, deliberately. Google's # `com.googlecode` artifact used to sit alongside it; the two ship separate copies of the metadata, # so any version skew between them meant they could disagree on whether a number is valid — and the @@ -215,6 +221,8 @@ grpc-protobuf-lite = { module = "io.grpc:grpc-protobuf-lite", version.ref = "grp grpc-stub = { module = "io.grpc:grpc-stub", version.ref = "grpc" } protobuf-kotlin-lite = { module = "com.google.protobuf:protobuf-kotlin-lite", version.ref = "protobuf" } protobuf-validate-runtime = { module = "dev.bmcreations:protovalidate-runtime", version.ref = "protovalidate-kt" } +ocp-client-protocol = { module = "com.flipcash:ocp-client-protocol", version.ref = "ocp-client-protocol" } +flipcash2-client-protocol = { module = "com.flipcash:flipcash2-client-protocol", version.ref = "flipcash2-client-protocol" } # Retrofit retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" } diff --git a/services/flipcash/build.gradle.kts b/services/flipcash/build.gradle.kts index 59b591828..e8fc17062 100644 --- a/services/flipcash/build.gradle.kts +++ b/services/flipcash/build.gradle.kts @@ -24,7 +24,7 @@ android { } dependencies { - implementation("com.flipcash:flipcash2-client-protocol:0.1.0") + implementation(libs.flipcash2.client.protocol) api(project(":libs:network:jwt")) api(project(":services:opencode")) implementation(project(":ui:resources")) diff --git a/services/opencode/build.gradle.kts b/services/opencode/build.gradle.kts index ee243aab8..a7f5334f2 100644 --- a/services/opencode/build.gradle.kts +++ b/services/opencode/build.gradle.kts @@ -27,7 +27,7 @@ android { } dependencies { - implementation("com.flipcash:ocp-client-protocol:0.1.0") + implementation(libs.ocp.client.protocol) api(project(":libs:currency-math")) api(project(":libs:datetime")) api(project(":libs:encryption:base58"))