feat(gradle): build the contract packages from local checkouts - #1327
Merged
Conversation
Trying a proto change meant publishing a version for it, because the contract packages are only ever consumed at the versions pinned in libs.versions.toml. Setting protoLocalRoot in local.properties includes ocp-client-protocol and flipcash2-client-protocol as composite builds instead, and Gradle substitutes the com.flipcash modules for them on its own, because the coordinates match. Verified by pinning both versions to a nonexistent 99.99.99: :services:opencode resolves with protoLocalRoot set, and reports com.flipcash:ocp-client-protocol:99.99.99 FAILED without it, so the opt-in is what selects the local build rather than a cached artifact. local.properties is untracked and CI never writes it, so release builds keep resolving the published versions.
This was referenced Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changing a
.protoand seeing it in the app required a real release of the client packages, becausegradle/libs.versions.tomlis the only way in. Maven Central will not take a version number twice,so iterating burned versions.
settings.gradle.ktsnow reads an optionalprotoLocalRootfromlocal.properties. When it isset, the build includes
ocp-client-protocolandflipcash2-client-protocolfrom that directory ascomposite builds. Gradle substitutes them for
com.flipcash:ocp-client-protocolandcom.flipcash:flipcash2-client-protocolon its own because the coordinates match, so no moduledeclares anything different and the pinned versions are ignored while the override is on. A missing
checkout fails configuration with the path it looked for rather than silently falling back.
The opt-in lives in
local.properties, which is untracked and never written by CI, so a releasebuild resolves the version pins exactly as it does today.
Substitution is confirmed rather than assumed: with both versions temporarily pinned to a
nonexistent
99.99.99, resolution succeeds withprotoLocalRootset and reportscom.flipcash:ocp-client-protocol:99.99.99 FAILEDwithout it. A message appended to an uncommitted.protoreachedcom.codeinc.opencode.gen.common.v1.LocalDevProbe, and:services:opencode:compileDebugKotlinbuilt against it.Pairs with the client-repo change that lets the contract itself be synced from a local checkout:
code-payments/ocp-client-protocol#3 and code-payments/flipcash2-client-protocol#3.