Skip to content

Commit f0aeca4

Browse files
committed
Compile SDK for watchOS
1 parent e135bb0 commit f0aeca4

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

PowerSyncKotlin/build.gradle.kts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ kotlin {
1616
iosSimulatorArm64(),
1717
macosArm64(),
1818
macosX64(),
19+
watchosDeviceArm64(),
20+
watchosArm32(),
21+
watchosArm64(),
22+
watchosSimulatorArm64(),
23+
watchosX64(),
1924
).forEach {
2025
it.binaries.framework {
2126
baseName = "PowerSyncKotlin"

connectors/supabase/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ plugins {
1212
}
1313

1414
kotlin {
15-
powersyncTargets()
15+
// The Supabase KMP project does not support arm64 watchOS builds
16+
powersyncTargets(watchOS = false)
1617
targets.withType<KotlinNativeTarget> {
1718
compilations.named("main") {
1819
compileTaskProvider {

plugins/sonatype/src/main/kotlin/com/powersync/plugins/utils/KmpUtils.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ public fun KotlinTargetContainerWithPresetFunctions.powersyncTargets(
88
native: Boolean = true,
99
jvm: Boolean = true,
1010
includeTargetsWithoutComposeSupport: Boolean = true,
11+
watchOS: Boolean = true,
1112
) {
1213
if (jvm) {
1314
androidTarget {
@@ -37,6 +38,15 @@ public fun KotlinTargetContainerWithPresetFunctions.powersyncTargets(
3738
if (includeTargetsWithoutComposeSupport) {
3839
macosX64()
3940
macosArm64()
41+
42+
if (watchOS) {
43+
watchosDeviceArm64() // aarch64-apple-watchos
44+
watchosArm32() // armv7k-apple-watchos
45+
watchosArm64() // arm64_32-apple-watchos
46+
47+
watchosSimulatorArm64() // aarch64-apple-watchos-simulator
48+
watchosX64() // x86_64-apple-watchos-simulator
49+
}
4050
}
4151
}
4252
}

0 commit comments

Comments
 (0)