Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for iOS, watchOS and tvOS #454

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 22 additions & 12 deletions clikt/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,20 @@ kotlin {

linuxX64()
mingwX64()
macosX64()
macosArm64()

val darwinTargets = listOf(
macosArm64(),
macosX64(),
iosArm64(),
iosSimulatorArm64(),
iosX64(),
watchosArm64(),
watchosSimulatorArm64(),
watchosX64(),
tvosArm64(),
tvosSimulatorArm64(),
tvosX64()
)

sourceSets {
val commonMain by getting {
Expand Down Expand Up @@ -51,11 +63,10 @@ kotlin {
val nativeDarwinMain by creating {
dependsOn(nativeMain)
}
val macosX64Main by getting {
dependsOn(nativeDarwinMain)
}
val macosArm64Main by getting {
dependsOn(nativeDarwinMain)
darwinTargets.forEach {
getByName("${it.targetName}Main") {
dependsOn(nativeDarwinMain)
}
}

val nativeTest by creating {
Expand All @@ -70,11 +81,10 @@ kotlin {
val nativeDarwinTest by creating {
dependsOn(nativeTest)
}
val macosX64Test by getting {
dependsOn(nativeDarwinTest)
}
val macosArm64Test by getting {
dependsOn(nativeDarwinTest)
darwinTargets.forEach {
getByName("${it.targetName}Test") {
dependsOn(nativeDarwinTest)
}
}
}
}