Skip to content

Publish watchosArm32 artifact for kotlinx-rpc (blocks broad MPP target coverage) #511

@andreypfau

Description

@andreypfau

Is your feature request related to a problem? Please describe.
I’m enabling the widest possible Kotlin Multiplatform target matrix in my library. Dependency resolution fails because org.jetbrains.kotlinx:kotlinx-rpc-krpc-client is not published for watchosArm32, which prevents my project from compiling with a full Apple/desktop/mobile target set.

Couldn't resolve dependency 'org.jetbrains.kotlinx:kotlinx-rpc-krpc-client' in 'commonMain' for all target platforms.
The dependency should target platforms: [iosArm64, iosSimulatorArm64, iosX64, jvm, linuxArm64, linuxX64, macosArm64, macosX64, mingwX64, tvosArm64, tvosSimulatorArm64, tvosX64, watchosArm32, watchosArm64, watchosSimulatorArm64, watchosX64]
Unresolved platforms: [watchosArm32]

This contradicts the Kotlin API Guidelines for multiplatform distribution “Maximize your reach” (Kotlin docs: Build for multiplatform). The guidance recommends supporting as many KMP targets as possible so downstream libraries/apps can depend on a single artifact set instead of maintaining per-platform workarounds.

Describe the solution you'd like
Publish kotlinx-rpc-krpc for watchosArm32 alongside the existing Apple targets, so that commonMain dependency resolution succeeds for the full matrix including 32-bit watchOS. If a full implementation is not feasible on watchosArm32, a thin stub (feature-reduced) that preserves API surface for compilation would still unblock transitive consumers.

Describe alternatives you've considered

  • Dropping watchosArm32 from my targets. This narrows my library’s reach and forces consumers with legacy devices to fork or replace my lib.
  • Forking and republishing kotlinx-rpc with added watchosArm32 target. This is undesirable fragmentation.
  • Conditionalizing the dependency per-platform (placing it only in Apple 64-bit/watchOS simulator source sets). This breaks the “single commonMain dep” model and complicates builds.

Additional context
Minimal repro:

// build.gradle.kts (root)
plugins {
  kotlin("multiplatform") version "2.2.20"
}

kotlin {
  jvm()
  linuxX64(); linuxArm64()
  macosX64(); macosArm64()
  iosX64(); iosArm64(); iosSimulatorArm64()
  tvosX64(); tvosArm64(); tvosSimulatorArm64()
  watchosX64(); watchosArm64(); watchosSimulatorArm64()
  watchosArm32() // <- presence of this target triggers the unresolved dependency
  mingwX64()

  sourceSets {
    val commonMain by getting {
      dependencies {
        implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-client:0.10.0")
      }
    }
  }
}

Metadata

Metadata

Assignees

Labels

featureNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions