Skip to content
Merged
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
1 change: 1 addition & 0 deletions examples/helloswift/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ kotlin {
tvosSimulatorArm64(),
watchosX64(),
watchosArm64(),
watchosDeviceArm64(),
watchosSimulatorArm64(),
macosArm64(),
macosX64(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ enum class CompileTarget {
iosSimulatorArm64,
watchosX64,
watchosArm64,
watchosDeviceArm64,
watchosSimulatorArm64,
tvosX64,
tvosArm64,
Expand All @@ -28,6 +29,7 @@ enum class CompileTarget {
KonanTarget.IOS_SIMULATOR_ARM64.name -> iosSimulatorArm64
KonanTarget.WATCHOS_X64.name -> watchosX64
KonanTarget.WATCHOS_ARM64.name -> watchosArm64
KonanTarget.WATCHOS_DEVICE_ARM64.name -> watchosDeviceArm64
KonanTarget.WATCHOS_SIMULATOR_ARM64.name -> watchosSimulatorArm64
KonanTarget.TVOS_X64.name -> tvosX64
KonanTarget.TVOS_ARM64.name -> tvosArm64
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,15 +255,15 @@ abstract class CompileSwiftTask @Inject constructor(
private fun CompileTarget.operatingSystem(): String =
when (this) {
CompileTarget.iosX64, CompileTarget.iosArm64, CompileTarget.iosSimulatorArm64 -> "ios$minIos"
CompileTarget.watchosX64, CompileTarget.watchosArm64, CompileTarget.watchosSimulatorArm64 -> "watchos$minWatchos"
CompileTarget.watchosX64, CompileTarget.watchosArm64, CompileTarget.watchosDeviceArm64, CompileTarget.watchosSimulatorArm64 -> "watchos$minWatchos"
CompileTarget.tvosX64, CompileTarget.tvosArm64, CompileTarget.tvosSimulatorArm64 -> "tvos$minTvos"
CompileTarget.macosX64, CompileTarget.macosArm64 -> "macosx$minMacos"
}

private fun minOs(compileTarget: CompileTarget): Int =
when (compileTarget) {
CompileTarget.iosX64, CompileTarget.iosArm64, CompileTarget.iosSimulatorArm64 -> minIos
CompileTarget.watchosX64, CompileTarget.watchosArm64, CompileTarget.watchosSimulatorArm64 -> minWatchos
CompileTarget.watchosX64, CompileTarget.watchosArm64, CompileTarget.watchosDeviceArm64, CompileTarget.watchosSimulatorArm64 -> minWatchos
CompileTarget.tvosX64, CompileTarget.tvosArm64, CompileTarget.tvosSimulatorArm64 -> minTvos
CompileTarget.macosX64, CompileTarget.macosArm64 -> minMacos
}
Expand All @@ -279,6 +279,7 @@ val SDKLESS_TARGETS = listOf(
CompileTarget.iosArm64,
CompileTarget.iosSimulatorArm64,
CompileTarget.watchosArm64,
CompileTarget.watchosDeviceArm64,
CompileTarget.watchosX64,
CompileTarget.watchosSimulatorArm64,
CompileTarget.tvosArm64,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ internal fun CompileTarget.os() = when(this) {
CompileTarget.iosArm64 -> "iphoneos"
CompileTarget.iosSimulatorArm64 -> "iphonesimulator"
CompileTarget.watchosX64 -> "watchsimulator"
CompileTarget.watchosArm64 -> "watchos"
CompileTarget.watchosArm64, CompileTarget.watchosDeviceArm64 -> "watchos"
CompileTarget.watchosSimulatorArm64 -> "watchsimulator"
CompileTarget.tvosX64 -> "appletvsimulator"
CompileTarget.tvosArm64 -> "appletvos"
Expand All @@ -22,6 +22,7 @@ internal fun CompileTarget.arch() = when(this) {
CompileTarget.iosSimulatorArm64 -> "arm64"
CompileTarget.watchosX64 -> "x86_64"
CompileTarget.watchosArm64 -> "arm64"
CompileTarget.watchosDeviceArm64 -> "arm64"
CompileTarget.watchosSimulatorArm64 -> "arm64"
CompileTarget.tvosX64 -> "x86_64"
CompileTarget.tvosArm64 -> "arm64"
Expand All @@ -40,7 +41,7 @@ internal fun CompileTarget.simulatorSuffix() = when(this) {
CompileTarget.iosArm64 -> ""
CompileTarget.iosSimulatorArm64 -> "-simulator"
CompileTarget.watchosX64 -> "-simulator"
CompileTarget.watchosArm64 -> ""
CompileTarget.watchosArm64, CompileTarget.watchosDeviceArm64 -> ""
CompileTarget.watchosSimulatorArm64 -> "-simulator"
CompileTarget.tvosX64 -> "-simulator"
CompileTarget.tvosArm64 -> ""
Expand All @@ -52,7 +53,7 @@ internal fun CompileTarget.simulatorSuffix() = when(this) {
internal fun CompileTarget.linkerPlatformVersionName() = when(this) {
CompileTarget.iosArm64 -> "platform_version ios"
CompileTarget.iosX64, CompileTarget.iosSimulatorArm64 -> "platform_version ios-simulator"
CompileTarget.watchosArm64 -> "platform_version watchos"
CompileTarget.watchosArm64, CompileTarget.watchosDeviceArm64 -> "platform_version watchos"
CompileTarget.watchosX64, CompileTarget.watchosSimulatorArm64 -> "platform_version watchos-simulator"
CompileTarget.tvosArm64 -> "platform_version tvos"
CompileTarget.tvosX64, CompileTarget.tvosSimulatorArm64 -> "platform_version tvos-simulator"
Expand All @@ -65,6 +66,7 @@ internal fun CompileTarget.linkerMinOsVersionName() = when(this) {
CompileTarget.iosSimulatorArm64 -> "ios_simulator_version_min"
CompileTarget.watchosX64 -> "watchos_simulator_version_min"
CompileTarget.watchosArm64 -> "watchos_version_min"
CompileTarget.watchosDeviceArm64 -> "watchos_version_min"
CompileTarget.watchosSimulatorArm64 -> "watchos_simulator_version_min"
CompileTarget.tvosX64 -> "tvos_simulator_version_min"
CompileTarget.tvosArm64 -> "tvos_version_min"
Expand Down