Add support for iOS, watchOS and tvOS#120
Conversation
This adds support for all known Apple platforms so that this library can be used in any Xcode project.
3bb1f4e to
efbebe3
Compare
| val darwinMain by creating { dependsOn(posixMain) } | ||
| darwinTargets.forEach { | ||
| getByName("${it.targetName}Main").dependsOn(darwinMain) | ||
| getByName("${it.targetName}Test").dependsOn(commonTest) |
There was a problem hiding this comment.
Is dependsOn(commonTest) necessary? I thought commonMain and commonTest were implicit.
|
Thanks for the PR, and thanks for the use case example; I would have wondered how a CLI could be used on an iphone. Let add these targets to the github actions tests for the macos runner (or at least all of the targets that can be run from ios). Do ios, watchos, and tvos have identical syscalls to macos? Otherwise we'll need to write new versions of |
|
In case it's easy, while you are at it, would you mind setting things up for Android as well? Use caseIn my company here there are people that are running clikt inside their test flavor of Android app, which they use to validate things in some e2e tests they run. Because of this, we're currently stuck on clikt pre 4.0 and I'd love to bump to the latest. |
|
I've created an issue about this #165 with more details |
|
I added iOS in #168, watchOS and tvOS are blocked by JetBrains/markdown#159 |
This adds support for all known Apple platforms
I was upgrading my iOS/macOS/Android app to Kotlin 1.9.10 in the process of replacing my usage of
kotlinx-cliwithclikt, I realized that it doesn't have support for iOS. I added support toclikt, and it depends onmordantand thus here I am 😄This approach works well for kotlin-logging, which I use for logging in my app.
I use command line arguments on iOS to configure the binary for integration testing: