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
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion bom/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ dependencies {
constraints {
// Every published artifact in lockstep. Version comes from
// project.version (axion-release-driven once A3 lands).
api("org.meshtastic:sdk-proto:${project.version}")
api("org.meshtastic:sdk-core:${project.version}")
api("org.meshtastic:sdk-transport-ble:${project.version}")
api("org.meshtastic:sdk-transport-tcp:${project.version}")
Expand Down
5 changes: 0 additions & 5 deletions build-logic/convention/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ java {
dependencies {
compileOnly(libs.kotlinGradlePlugin)
compileOnly(libs.agpGradlePlugin)
compileOnly(libs.wireGradlePlugin)
compileOnly(libs.sqldelightGradlePlugin)
// Convention plugin applies vanniktech maven-publish AND configures its
// extension, so its API has to be on the runtime classpath, not just
Expand Down Expand Up @@ -43,10 +42,6 @@ gradlePlugin {
id = "meshtastic.publishing"
implementationClass = "PublishingConventionPlugin"
}
register("proto") {
id = "meshtastic.proto"
implementationClass = "ProtoConventionPlugin"
}
register("sampleAndroid") {
id = "meshtastic.sample.android"
implementationClass = "SampleAndroidConventionPlugin"
Expand Down
28 changes: 0 additions & 28 deletions build-logic/convention/src/main/kotlin/ProtoConventionPlugin.kt

This file was deleted.

5 changes: 1 addition & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ plugins {
alias(libs.plugins.androidKotlinMultiplatformLibrary) apply false
alias(libs.plugins.composeCompiler) apply false
alias(libs.plugins.composeMultiplatform) apply false
alias(libs.plugins.wire) apply false
alias(libs.plugins.sqldelight) apply false
alias(libs.plugins.spotless)
alias(libs.plugins.detekt) apply false
Expand Down Expand Up @@ -46,7 +45,6 @@ allprojects {
}

dependencies {
dokka(project(":proto"))
dokka(project(":core"))
dokka(project(":transport-ble"))
dokka(project(":transport-tcp"))
Expand All @@ -67,7 +65,6 @@ spotless {
"**/.gradle/**",
"**/generated/**",
"**/node_modules/**",
"proto/src/protobufs/**",
"**/detekt-baseline.xml",
"**/api/*.api",
"gradle/wrapper/**",
Expand Down Expand Up @@ -128,7 +125,7 @@ subprojects {
}

val libraryModules =
setOf("proto", "core", "transport-ble", "transport-tcp", "transport-serial", "storage-sqldelight", "testing")
setOf("core", "transport-ble", "transport-tcp", "transport-serial", "storage-sqldelight", "testing")
subprojects {
if (name in libraryModules) {
apply(plugin = "org.jetbrains.kotlinx.kover")
Expand Down
19 changes: 8 additions & 11 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ kotlin {

sourceSets {
commonMain.dependencies {
api(project(":proto"))
api(libs.meshtasticProtobufs)
api(libs.coroutinesCore)
api(libs.kotlinxIoCore)
implementation(libs.atomicfu)
Expand All @@ -43,15 +43,13 @@ kotlin {
}

// ---------------------------------------------------------------------------
// Architecture enforcement (ADR-008): :core must depend on no other module
// in this build except :proto. Verified at configuration time by walking
// every Kotlin source-set dependency and rejecting any ProjectDependency
// whose path is not :proto. Hooked into `check` so CI catches drift.
// Architecture enforcement (ADR-008): :core must not depend on other in-tree
// modules. Now that proto types come from the published org.meshtastic:protobufs
// artifact, :core has zero project dependencies. Verified at configuration time.
// ---------------------------------------------------------------------------
val verifyModuleBoundary by tasks.registering {
group = "verification"
description = "Fails if :core declares a project dependency other than :proto (ADR-008)."
val allowed = setOf(":proto")
description = "Fails if :core declares any project dependency (ADR-008)."
val violations = mutableListOf<String>()
configurations
.matching {
Expand All @@ -63,15 +61,14 @@ val verifyModuleBoundary by tasks.registering {
.configureEach {
val configName = name
dependencies.withType(ProjectDependency::class.java).configureEach {
if (path !in allowed) {
violations += "configuration=$configName -> $path"
}
violations += "configuration=$configName -> $path"
}
}
doLast {
if (violations.isNotEmpty()) {
throw GradleException(
"ADR-008 violation: :core may only depend on :proto. Offending project deps:\n" +
"ADR-008 violation: :core must not depend on other in-tree modules. " +
"Offending project deps:\n" +
violations.joinToString("\n") { " - $it" },
)
}
Expand Down
7 changes: 3 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ atomicfu = "0.32.1"
okio = "3.17.0"

# --- Protobuf / Wire ---
wire = "6.4.0" # matches Meshtastic-Android
wire = "6.4.0" # wire-runtime version (transitive via protobufs SDK)
protobuf = "4.34.1"
meshtasticProtobufs = "2.7.25-SNAPSHOT"

# --- Storage ---
sqldelight = "2.3.2"
Expand Down Expand Up @@ -73,10 +74,9 @@ kotlinxIoCore = { module = "org.jetbrains.kotlinx:kotlinx-io-core"
atomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version.ref = "atomicfu" }
okio = { module = "com.squareup.okio:okio", version.ref = "okio" }

wireRuntime = { module = "com.squareup.wire:wire-runtime", version.ref = "wire" }
wireMoshiAdapter = { module = "com.squareup.wire:wire-moshi-adapter", version.ref = "wire" }
wireGradlePlugin = { module = "com.squareup.wire:wire-gradle-plugin", version.ref = "wire" }
protobufKotlin = { module = "com.google.protobuf:protobuf-kotlin", version.ref = "protobuf" }
meshtasticProtobufs = { module = "org.meshtastic:protobufs", version.ref = "meshtasticProtobufs" }

sqldelightRuntime = { module = "app.cash.sqldelight:runtime", version.ref = "sqldelight" }
sqldelightCoroutinesExt = { module = "app.cash.sqldelight:coroutines-extensions", version.ref = "sqldelight" }
Expand Down Expand Up @@ -116,7 +116,6 @@ kotlinAndroid = { id = "org.jetbrains.kotlin.android",
kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
androidLibrary = { id = "com.android.library", version.ref = "agp" }
androidKotlinMultiplatformLibrary = { id = "com.android.kotlin.multiplatform.library", version.ref = "agp" }
wire = { id = "com.squareup.wire", version.ref = "wire" }
sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" }
vanniktechMavenPublish = { id = "com.vanniktech.maven.publish", version.ref = "vanniktechMavenPublish" }
androidApplication = { id = "com.android.application", version.ref = "agp" }
Expand Down
186 changes: 93 additions & 93 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 0 additions & 16 deletions proto/Module.md

This file was deleted.

Loading
Loading