build: stop declaring an iosArm64 target nothing builds or ships (#7465)

This commit is contained in:
James Rich authored and GitHub committed 2026-09-29 23:47:51 +00:00
1 parent fda9140720
commit 5450f659de
2 files changed
+7 -9

No files matched your search

+1 -1
View File
@@ -55,7 +55,7 @@ Guidelines on managing Kotlin Multiplatform (KMP) source-sets, expected abstract
- In `build-logic/convention`, prefer lazy Gradle configuration (`configureEach`, `withPlugin`, provider APIs). Avoid `afterEvaluate` in convention plugins unless there is no viable lazy alternative.
## 8. Onboarding a New Target (Desktop/iOS)
1. Ensure all new logic compiles against the KMP core (`jvm()`, `iosArm64()`, etc.).
1. Ensure all new logic compiles against the KMP core targets (`jvm()`, `iosSimulatorArm64()`).
2. Do not use platform-specific constructs in `commonMain` or you break the iOS/Desktop builds.
3. Test using `kmpSmokeCompile` to verify cross-platform compilation.
4. For desktop wiring, copy the pattern in `desktopApp/src/main/kotlin/org/meshtastic/desktop/di/DesktopKoinModule.kt` and use `NoopStubs.kt` to temporarily mock missing platform implementations.
@@ -113,13 +113,12 @@ internal fun Project.configureKotlinMultiplatform() {
// Standard KMP targets for Meshtastic
jvm()
// iOS targets for compile-only validation. Only register on hosts where
// Kotlin/Native can run — KSP attaches to every Kotlin target's compilation
// and crashes at configuration time on unsupported hosts (e.g. linux-aarch64)
// with "Could not create task ':…:kspKotlinIosArm64' > Unknown host target".
// iOS simulator target for compile-only validation; nothing here links a device
// framework, so there is no iosArm64. Only register on hosts where Kotlin/Native
// can run: KSP attaches to every Kotlin target's compilation and crashes at
// configuration time on unsupported hosts (e.g. linux-aarch64) with "Unknown host target".
// Supported set: https://kotlinlang.org/docs/native-target-support.html
if (supportsKotlinNative()) {
iosArm64()
iosSimulatorArm64()
}
@@ -144,14 +143,13 @@ internal fun Project.configureKotlinMultiplatform() {
}
// Disable iOS native test link & run tasks.
// iOS targets exist only for compile-time validation; linking test
// The iOS target exists only for compile-time validation; linking test
// executables is extremely slow and causes `./gradlew test` to hang.
tasks.configureEach {
val taskName = name.lowercase()
if (taskName.contains("iosarm64") || taskName.contains("iossimulatorarm64")) {
if (taskName.contains("iossimulatorarm64")) {
val isDisabledIosTask =
(taskName.startsWith("link") && taskName.contains("test")) ||
taskName == "iosarm64test" ||
taskName == "iossimulatorarm64test" ||
taskName.endsWith("testbinaries")
if (isDisabledIosTask) {