Skip to content

Commit

Permalink
Add more apple native targets (#777)
Browse files Browse the repository at this point in the history
Co-authored-by: hfhbd <[email protected]>
  • Loading branch information
hfhbd and hfhbd authored Aug 16, 2023
1 parent d7b770f commit 8fa7050
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 30 deletions.
48 changes: 20 additions & 28 deletions clients/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,15 @@ sqldelight {
kotlin {
jvmToolchain(8)

targetHierarchy.default()

androidTarget()
jvm("desktop")

js(IR) {
browser()
}

val xcf = XCFramework()
fun KotlinNativeTarget.config() {
binaries {
Expand All @@ -35,16 +41,20 @@ kotlin {
}
}
}
iosArm64 {
config()
}
iosSimulatorArm64 {
config()
}

js(IR) {
browser()
}
macosX64 { config() }
macosArm64 { config() }

iosArm64 { config() }
iosSimulatorArm64 { config() }

watchosArm32 { config() }
watchosArm64 { config() }
// watchosDeviceArm64 { config() }
watchosSimulatorArm64 { config() }

tvosArm64 { config() }
tvosSimulatorArm64 { config() }

sourceSets {
commonMain {
Expand All @@ -70,30 +80,12 @@ kotlin {
}
}

val iosMain by creating {
dependsOn(commonMain.get())
named("appleMain") {
dependencies {
implementation(libs.ktor.client.darwin)
implementation(libs.sqldelight.nativeDriver)
}
}
val iosTest by creating {
dependsOn(commonTest.get())
}

val iosArm64Main by getting {
dependsOn(iosMain)
}
val iosArm64Test by getting {
dependsOn(iosTest)
}

val iosSimulatorArm64Main by getting {
dependsOn(iosMain)
}
val iosSimulatorArm64Test by getting {
dependsOn(iosTest)
}
}
}

Expand Down
17 changes: 15 additions & 2 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile
import org.jetbrains.kotlin.gradle.dsl.*

plugins {
kotlin("multiplatform")
Expand All @@ -9,12 +9,25 @@ plugins {
kotlin {
jvmToolchain(8)

jvm()

js(IR) {
browser()
}

macosX64()
macosArm64()

iosArm64()
iosSimulatorArm64()
jvm()

watchosArm32()
watchosArm64()
// watchosDeviceArm64()
watchosSimulatorArm64()

tvosArm64()
tvosSimulatorArm64()

explicitApi()

Expand Down

0 comments on commit 8fa7050

Please sign in to comment.