Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ plugins {
alias(libs.plugins.vanniktech.mavenPublish) apply false
alias(libs.plugins.spotless) apply false
alias(libs.plugins.detekt) apply false
alias(libs.plugins.wire) apply false
}

// ---------------------------------------------------------------------------
Expand Down
5 changes: 2 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ detekt = "1.23.8"
bcv = "0.18.1"
dokka = "2.2.0"
kover = "0.9.8"
wire = "6.4.0"
meshtastic-protobufs = "2.7.25-SNAPSHOT"
konsist = "0.17.3"

[libraries]
Expand All @@ -34,6 +34,7 @@ ktor-client-winhttp = { module = "io.ktor:ktor-client-winhttp", version.ref = "k
ktor-client-js = { module = "io.ktor:ktor-client-js", version.ref = "ktor" }
ktor-client-websockets = { module = "io.ktor:ktor-client-websockets", version.ref = "ktor" }
kotlinx-io-bytestring = { module = "org.jetbrains.kotlinx:kotlinx-io-bytestring", version.ref = "kotlinx-io" }
meshtastic-protobufs = { module = "org.meshtastic:protobufs", version.ref = "meshtastic-protobufs" }
compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "compose-multiplatform" }
compose-foundation = { module = "org.jetbrains.compose.foundation:foundation", version.ref = "compose-multiplatform" }
compose-material3 = { module = "org.jetbrains.compose.material3:material3", version.ref = "compose-material3" }
Expand All @@ -48,7 +49,6 @@ lifecycle-viewmodel = { module = "org.jetbrains.androidx.lifecycle:lifecycle-vie
lifecycle-viewmodel-compose = { module = "org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "lifecycle" }
lifecycle-runtime-compose = { module = "org.jetbrains.androidx.lifecycle:lifecycle-runtime-compose", version.ref = "lifecycle" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" }
wire-runtime = { module = "com.squareup.wire:wire-runtime", version.ref = "wire" }
konsist = { module = "com.lemonappdev:konsist", version.ref = "konsist" }

[plugins]
Expand All @@ -63,4 +63,3 @@ detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" }
bcv = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "bcv" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
wire = { id = "com.squareup.wire", version.ref = "wire" }
1 change: 0 additions & 1 deletion protobufs
Submodule protobufs deleted from 940ac3
30 changes: 2 additions & 28 deletions sample/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl

plugins {
alias(libs.plugins.kotlinMultiplatform)
alias(libs.plugins.android.kotlin.multiplatform.library)
alias(libs.plugins.composeMultiplatform)
alias(libs.plugins.composeCompiler)
alias(libs.plugins.wire)
}

kotlin {
Expand All @@ -21,12 +19,6 @@ kotlin {

jvm("desktop")

@OptIn(ExperimentalWasmDsl::class)
wasmJs {
browser()
binaries.executable()
}

listOf(
iosArm64(),
iosSimulatorArm64(),
Expand All @@ -53,7 +45,7 @@ kotlin {
implementation(libs.lifecycle.viewmodel.compose)
implementation(libs.lifecycle.runtime.compose)
implementation(project(":library"))
implementation(libs.wire.runtime)
implementation(libs.meshtastic.protobufs)
implementation(libs.kotlinx.io.bytestring)
}

Expand All @@ -72,28 +64,10 @@ kotlin {
}
}

wire {
sourcePath {
srcDir("../protobufs")
include("meshtastic/*.proto")
}
protoPath {
srcDir("../protobufs")
include("nanopb.proto")
}
kotlin {
makeImmutableCopies = false
boxOneOfsMinSize = 5000
}
root("meshtastic.*")
prune("meshtastic.MeshPacket#delayed")
prune("meshtastic.MeshPacket.Delayed")
}

compose.desktop {
application {
mainClass = "MainKt"
// Sample app — ProGuard adds no value and trips on wire-runtime's Android-only classes.
// Sample app — ProGuard adds no value and trips on wire-runtime classes.
buildTypes.release.proguard {
isEnabled.set(false)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ class MqttSampleViewModel : ViewModel() {
val envelope = ServiceEnvelope.ADAPTER.decode(bytes)
val packet = envelope.packet ?: return null

val isEncrypted = packet.encrypted != null && packet.encrypted.size > 0
val isEncrypted = packet.encrypted.let { it != null && it.size > 0 }
val decoded = packet.decoded

val portnum = decoded?.portnum?.takeIf { it != PortNum.UNKNOWN_APP }
Expand Down
3 changes: 3 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven("https://central.sonatype.com/repository/maven-snapshots/") {
mavenContent { snapshotsOnly() }
}
}
}

Expand Down
Loading