JoakimForslund
04/18/2019, 7:27 AMsvyatoslav.scherbina
04/18/2019, 7:35 AMJoakimForslund
04/18/2019, 7:38 AMJoakimForslund
04/18/2019, 7:41 AMJoakimForslund
04/18/2019, 8:13 AMsvyatoslav.scherbina
04/18/2019, 9:23 AMcocoapods
plugin supports only frameworks currently.
What do you mean by “Nothing seems to happen at least when you add staticLib to the binaries dsl or using the old outputKinds(“static”)“?JoakimForslund
04/18/2019, 9:29 AMJoakimForslund
04/18/2019, 9:29 AMJoakimForslund
04/18/2019, 9:30 AMJoakimForslund
04/18/2019, 9:31 AMandrew
04/18/2019, 10:08 AMJoakimForslund
04/18/2019, 10:44 AMsvyatoslav.scherbina
04/18/2019, 11:29 AMSo basicly what you are saying, is that if you use the cocoapods plugin, you can no longer build anything else than frameworks.No, this should not be true.
svyatoslav.scherbina
04/18/2019, 11:40 AMlinkMainReleaseStaticIOS
Gradle task?JoakimForslund
04/18/2019, 12:24 PMlinkMainReleaseStaticIOS
Gradle task will not run from xcodeJoakimForslund
04/18/2019, 12:24 PMJoakimForslund
04/18/2019, 12:26 PMsvyatoslav.scherbina
04/18/2019, 12:40 PMand theWhat does prevent you from runningGradle task will not run from xcodelinkMainReleaseStaticIOS
linkMainReleaseStaticIOS
from Xcode (e.g. as additional build script phase)?JoakimForslund
04/18/2019, 12:43 PMsvyatoslav.scherbina
04/18/2019, 12:45 PMlinkMainReleaseFrameworkIOS
depend on linkMainReleaseStaticIOS
.JoakimForslund
04/18/2019, 12:46 PMsvyatoslav.scherbina
04/18/2019, 12:47 PMJoakimForslund
04/18/2019, 12:47 PMsvyatoslav.scherbina
04/18/2019, 12:48 PMsvyatoslav.scherbina
04/18/2019, 12:48 PMJoakimForslund
04/18/2019, 12:49 PMJoakimForslund
04/18/2019, 1:16 PMlinkDebugFrameworkIOS64
and
linkDebugStaticIOS64
doing that at least makes it compile under xcode, but not under intellij because the IOS64 target is still named IOS, not sure if this is because of my setup or not tho.JoakimForslund
04/18/2019, 1:16 PMsvyatoslav.scherbina
04/18/2019, 1:19 PMbut not under intellijIt is not supposed to work when using cocoapods plugin.
JoakimForslund
04/18/2019, 1:20 PMlinkDebugFrameworkIOS64
at that pointJoakimForslund
04/18/2019, 1:20 PMJoakimForslund
04/18/2019, 1:20 PMJoakimForslund
04/18/2019, 1:38 PMval isFromXcodeCheck = if (project.properties["kotlin.native.cocoapods.target"] != null) true else false
if (isFromXcodeCheck) {
tasks {
"linkDebugFrameworkIOS64" {
dependsOn("linkDebugStaticIOS64")
}
}
}
gradle.taskGraph.beforeTask {
val numberOfPods = kotlin.cocoapods.pods.size
if (numberOfPods > 0 && !isFromXcodeCheck) {
if (this.name.toLowerCase().contains("generatedef") || this.name.toLowerCase().contains("ios") || this.name.toLowerCase().contains(
"interop"
)
) {
this.setActions(listOf())
logger.warn("iOS target needs to be build from xcode in cases when pods libraries are used")
}
}
}
but it is basicly needed to still have a sane working experience with the normal gradle tasks in intellij for the other targets (mainly being able to use :assemble and :build)
when using cocoapods with the pods propertyJoakimForslund
04/18/2019, 1:40 PMJoakimForslund
04/18/2019, 1:48 PMsvyatoslav.scherbina
04/18/2019, 1:57 PMiOS64
is declared in your build script explicitly.JoakimForslund
04/18/2019, 1:59 PMlinkDebugStaticIOS64
svyatoslav.scherbina
04/18/2019, 2:02 PMJoakimForslund
04/18/2019, 2:02 PMJoakimForslund
04/18/2019, 2:03 PMilya.matveev
04/19/2019, 12:40 PMOh ok, so it only adds framework then, and launches only the defined tasks?Yes, the CocoaPods plugin builds only frameworks needed to use a Kotlin/Native module from Xcode. But it's still possible to run other tasks by adding corresponding build steps in Xcode, modifying the podspec file or configuring dependencies between tasks as @svyatoslav.scherbina proposed. The plugin neither creates new targets nor overwrites the
binary
property. It only adds frameworks to all existing Apple targets.
It also currently block :assemble / :build from being able to complete for other targets
it is basicly needed to still have a sane working experience with the normal gradle tasks in intellij for the other targets (mainly being able to use :assemble and :build) when using cocoapods with the pods propertyYes, it's the sad current limitation because we use Xcode project configured by CocoaPods to obtain parameters needed to generate cinterop (like compiler flags or header paths). Probably we will be able to get rid of this limitation in further releases.
ilya.matveev
04/19/2019, 12:48 PMI can't even build frameworks when using 1.3.30 :/Could you please provide more details about your problem? Do you run the build from Xcode?
andrew
04/19/2019, 12:48 PMandrew
04/19/2019, 12:48 PMilya.matveev
04/19/2019, 12:49 PMandrew
04/19/2019, 12:49 PMandrew
04/19/2019, 12:49 PMilya.matveev
04/19/2019, 12:50 PMilya.matveev
04/19/2019, 12:51 PMandrew
04/19/2019, 12:51 PMilya.matveev
04/19/2019, 12:52 PM