Skip to content

Replace local Wire codegen with org.meshtastic:protobufs SDK#42

Draft
jamesarich wants to merge 2 commits into
masterfrom
migrate-to-protobufs-sdk
Draft

Replace local Wire codegen with org.meshtastic:protobufs SDK#42
jamesarich wants to merge 2 commits into
masterfrom
migrate-to-protobufs-sdk

Conversation

@jamesarich
Copy link
Copy Markdown
Collaborator

The KMP protobufs SDK (meshtastic/protobufs) now publishes all Wire-generated models including atak.proto types. This removes the local Wire codegen from TAKPacket-SDK and consumes those types from the published artifact instead.

What changed

  • Removed Wire plugin and wire {} configuration block
  • Replaced api(wire-runtime) with implementation(org.meshtastic:protobufs:2.7.25-SNAPSHOT)
  • Removed JVM JAR Team/MemberRole class exclusion task (no longer generating proto classes locally)
  • Bumped jvmToolchain(17) to 21 (matches protobufs SDK class format)
  • Added Sonatype snapshots repository

Key design decision

The protobufs SDK is an implementation dependency, NOT api. This means proto types do NOT leak transitively to consumers. Consumers (e.g. Meshtastic-Android) bring their own org.meshtastic:protobufs dependency, giving exactly one source of truth on the classpath.

This eliminates the historical pruning/duplicate-class dance between this SDK and consumers (issues #5, #6).

Breaking change for consumers

Consumers that previously got org.meshtastic.proto.* types transitively from this SDK must now depend on org.meshtastic:protobufs directly. See meshtastic/Meshtastic-Android#5675 for the companion PR.

Drop the Wire plugin and local atak.proto codegen in favor of the
published protobufs SDK (2.7.25-SNAPSHOT). The dependency uses
`implementation` scope so proto types are NOT re-exported to consumers,
eliminating the historical pruning/duplicate-class issues (#5, #6).

Changes:
- Remove Wire plugin and wire {} configuration block
- Replace api(wire-runtime) with implementation(protobufs SDK)
- Remove JVM JAR Team/MemberRole class exclusion task (no longer needed)
- Bump jvmToolchain 17 -> 21 (matches protobufs SDK class format)
- Add Sonatype snapshots repository for SNAPSHOT resolution

Consumers must now bring their own org.meshtastic:protobufs dependency
to get proto types on their compile classpath.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jamesarich jamesarich requested a review from thebentern May 30, 2026 18:27
With Wire codegen removed, the iOS targets have no source to compile.
The actual SDK code (CotXmlParser, TakCompressor, etc.) is JVM-only
(java.time, XmlPullParser, zstd-jni). iOS consumers get proto types
directly from the protobufs SDK.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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