You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you create a new kotlin kmm project as it is today, in the shared module there is a task
val packForXcode by tasks.creating(Sync::class) {
group = "build"
val mode = System.getenv("CONFIGURATION") ?: "DEBUG"
val sdkName = System.getenv("SDK_NAME") ?: "iphonesimulator"
val targetName = "ios" + if (sdkName.startsWith("iphoneos")) "Arm64" else "X64"
val framework = kotlin.targets.getByName<KotlinNativeTarget>(targetName).binaries.getFramework(mode)
inputs.property("mode", mode)
dependsOn(framework.linkTask)
val targetDir = File(buildDir, "xcode-frameworks")
from({ framework.outputDirectory })
into(targetDir)
}
tasks.getByName("build").dependsOn(packForXcode)
I looked high and low in this repo and its commit history and I never saw this here. I understand using the cocoapods and pod file in the ios project. I was able to generate those same files in my own project. However when I delete the generated task above I get the following error:
Task 'packForXCode' not found in project ':shared'.
I was wondering if you could explain how you came to implement something like this from a purely learning perspective? What were the reasons you implemented this was as opposed the generated task mentioned above?
Thanks for taking the time to read this/ answer my questions!
This discussion was converted from issue #149 on March 23, 2021 16:50.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When you create a new kotlin kmm project as it is today, in the shared module there is a task
I looked high and low in this repo and its commit history and I never saw this here. I understand using the cocoapods and pod file in the ios project. I was able to generate those same files in my own project. However when I delete the generated task above I get the following error:
I read through the docs of following:
https://github.com/touchlab/KotlinCocoapods
https://github.com/touchlab/KaMPKit/blob/master/docs/IOS_PROJ_INTEGRATION.md
at first I thought it was due to not using: cocoapodsext in the build file but I found a similar repo : https://github.com/joreilly/PeopleInSpace/blob/master/common/build.gradle.kts that manages to do the same logic with the native plugin. I tried looking through the gradle tasks as well and I saw no discernible difference in that regard we well.
I was wondering if you could explain how you came to implement something like this from a purely learning perspective? What were the reasons you implemented this was as opposed the generated task mentioned above?
Thanks for taking the time to read this/ answer my questions!
Beta Was this translation helpful? Give feedback.
All reactions