Skip to content

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

Merged
jamesarich merged 3 commits into
masterfrom
migrate-to-protobufs-sdk
Jun 10, 2026
Merged

Replace local Wire codegen with org.meshtastic:protobufs SDK#42
jamesarich merged 3 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.

jamesarich and others added 3 commits June 10, 2026 07:26
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>
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>
@jamesarich jamesarich force-pushed the migrate-to-protobufs-sdk branch from 5a11446 to f46ac0f Compare June 10, 2026 12:29
@jamesarich jamesarich marked this pull request as ready for review June 10, 2026 12:29
@jamesarich jamesarich merged commit e77c604 into master Jun 10, 2026
7 checks passed
@jamesarich jamesarich deleted the migrate-to-protobufs-sdk branch June 10, 2026 12:32
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