Skip to content

build: replace local Wire codegen with org.meshtastic:protobufs SDK#5

Draft
jamesarich wants to merge 2 commits into
mainfrom
jamesarich/protobuf-sdk-transition
Draft

build: replace local Wire codegen with org.meshtastic:protobufs SDK#5
jamesarich wants to merge 2 commits into
mainfrom
jamesarich/protobuf-sdk-transition

Conversation

@jamesarich
Copy link
Copy Markdown
Collaborator

Summary

Replace the in-tree :proto module (Wire codegen + protobufs git submodule) with the published org.meshtastic:protobufs:2.7.25-SNAPSHOT artifact. This aligns with the same transition already made in Meshtastic-Android #5675, MQTTastic-Client-KMP #50, and TAKPacket-SDK #42.

Type of change

  • Infrastructure / CI / build

Related issue / discussion

Refs meshtastic/Meshtastic-Android#5675, meshtastic/MQTTastic-Client-KMP#50, meshtastic/TAKPacket-SDK#42

Affirmations

  • All commits are signed off (DCO -- git commit -s).
  • I have read CONTRIBUTING.md.
  • If this changes the public API, I have run ./gradlew updateKotlinAbi and committed the regenerated api/*.api files.
  • If this changes wire behavior, I have updated docs/protocol.md and cited firmware / sibling-app sources for verification.
  • If this is a non-trivial design change, I have added or updated an ADR under docs/decisions/.
  • I have run ./gradlew check locally and it passes.

How was this verified?

  • ./gradlew :core:compileCommonMainKotlinMetadata -- confirms proto types resolve from the published artifact
  • ./gradlew jvmTest -- all JVM tests pass (core, transports, storage)
  • ./gradlew :samples:cli:compileKotlin -- CLI sample still compiles with wireMoshiAdapter
  • ./gradlew :core:dependencies --configuration jvmRuntimeClasspath -- confirmed wire-runtime arrives transitively

Notes for reviewers

What was removed:

  • :proto module entirely (build script, Wire config, ABI baselines, submodule ref)
  • .gitmodules (protobufs submodule no longer needed)
  • Wire Gradle plugin, ProtoConventionPlugin, and wireRuntime catalog entry
  • proto references from dokka, kover, BOM, spotless excludes, and libraryModules

What was added:

  • org.meshtastic:protobufs:2.7.25-SNAPSHOT as api dependency on :core
  • Sonatype snapshots repository (https://central.sonatype.com/repository/maven-snapshots/)

Kept:

  • wire version + wireMoshiAdapter in the version catalog (used by samples/cli for JSON serialization)
  • wire-runtime comes transitively through the protobufs artifact

Architecture enforcement update:
The :core:verifyModuleBoundary task now rejects any project dependency (previously allowed :proto). Proto types are now an external library dependency.

Once the protobufs artifact publishes a stable release, the version should be updated from SNAPSHOT.

jamesarich and others added 2 commits May 30, 2026 15:56
Remove the :proto module and its Wire codegen infrastructure in favor of
the published org.meshtastic:protobufs:2.7.25-SNAPSHOT artifact. This
aligns with the same transition made in Meshtastic-Android, MQTTastic-
Client-KMP, and TAKPacket-SDK.

Changes:
- Remove :proto module (build.gradle.kts, source, ABI files, submodule)
- Remove .gitmodules (protobufs submodule no longer needed)
- Remove Wire Gradle plugin and ProtoConventionPlugin
- Add org.meshtastic:protobufs dependency to :core (api scope)
- Add Sonatype snapshots repository for SNAPSHOT resolution
- Update BOM to drop sdk-proto constraint
- Update architecture enforcement (no project deps allowed in :core)
- Remove proto from dokka, kover, libraryModules, and spotless excludes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: James Rich <james.a.rich@gmail.com>
wire-runtime is now provided transitively via org.meshtastic:protobufs.
Keep wireMoshiAdapter (used by samples/cli for JSON serialization).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: James Rich <james.a.rich@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant