Skip to content

Commit

Permalink
Add macosArm64 target
Browse files Browse the repository at this point in the history
Migrated to the kotlin 1.9.20 `applyDefaultHierarchyTemplate` approach.
  • Loading branch information
DrewCarlson committed Nov 14, 2023
1 parent 6e9b173 commit fc363ff
Showing 1 changed file with 7 additions and 20 deletions.
27 changes: 7 additions & 20 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ kotlin {
}
}
}
macosX64("macos")
macosX64()
macosArm64()
mingwX64("win64")
linuxX64()

Expand All @@ -64,7 +65,10 @@ kotlin {
iosSimulatorArm64()
watchosArm32()
watchosArm64()
tvos()
tvosArm64()
tvosSimulatorArm64()
tvosX64()
applyDefaultHierarchyTemplate()

sourceSets {
val commonMain by getting {
Expand Down Expand Up @@ -127,30 +131,13 @@ kotlin {
dependsOn(desktopCommonTest)
}

val iosMain by creating {
dependsOn(commonMain)
}
val iosTest by creating {
val iosTest by getting {
dependencies {
implementation(libs.coroutines.core)
implementation(libs.ktor.client.darwin)
}
}

sourceSets.filter { sourceSet ->
sourceSet.name.run {
startsWith("iosX64") ||
startsWith("iosArm") ||
startsWith("iosSimulator")
}
}.forEach { sourceSet ->
if (sourceSet.name.endsWith("Main")) {
sourceSet.dependsOn(iosMain)
} else {
sourceSet.dependsOn(iosTest)
}
}

// Configure tvos and watchos to build on ios sources
val tvosTest by getting
val watchosArm32Test by getting
Expand Down

0 comments on commit fc363ff

Please sign in to comment.