Nikolai
03/17/2019, 3:22 AMdependencies {
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core-native:$coroutines_version"
}
to iosMain dependences because my project uses coroutines in common part. After that I changed graddlew to update graddle version. Then I run buildDependences task to build all dependences. Success, after that I tried to run XCode project but got error:
* What went wrong:
Could not determine the dependencies of task ':app:copyFramework'.
> Task with path 'linkDebugFrameworkIos' not found in project ':app'.
I went to IDEA and found that 'copyFramework' task depends on 'linkDebugFrameworkIos', but I didn't find it in graddle tasks list.
task copyFramework {
def buildType = project.findProperty("kotlin.build.type") ?: "DEBUG"
def target = project.findProperty("kotlin.target") ?: "ios"
dependsOn "link${buildType.toLowerCase().capitalize()}Framework${target.capitalize()}"
doLast {
def srcFile = kotlin.targets."$target".compilations.main.getBinary("FRAMEWORK", buildType)
def targetDir = getProperty("configuration.build.dir")
copy {
from srcFile.parent
into targetDir
include 'app.framework/**'
include 'app.framework.dSYM'
}
}
}
I assume that when I upgraded graddle and changed graddlew it somehow removed this task.
How can I fix it?Ellen Shapiro
03/17/2019, 9:47 PMbuild/xcode-frameworks
folder and sets xcode up to grab it during compilation rather than trying to move it around prior to that: https://kotlinlang.org/docs/tutorials/native/mpp-ios-android.html#setting-up-framework-dependency-in-xcodeNikolai
03/18/2019, 1:10 AMsvyatoslav.scherbina
03/18/2019, 7:38 AMNikolai
03/19/2019, 12:26 AM