Wrappers not generated with KSP when using embedAndSignAppleFrameworkForXcode
See original GitHub issueThis is an issue that got mixed with #49.
User @yamakentoc reports that this gradle config doesn’t result in wrapper classes being generated.
// HogeHogeHoge/shared/build.gradle.kts
// kotlin version: 1.7,0
val ktorVersion = "2.0.1"
val kotlinCoroutineVersion = "1.6.3"
plugins {
kotlin("multiplatform")
id("com.android.library")
id("com.google.devtools.ksp") version "1.7.0-1.0.6"
id("com.futuremind.koru").version("0.11.0")
kotlin("plugin.serialization")
}
kotlin {
android()
listOf(
iosX64(),
iosArm64(),
iosSimulatorArm64()
).forEach {
it.binaries.framework {
baseName = "HogeHogeHoge"
}
}
sourceSets {
val commonMain by getting {
dependencies {
//Coroutines
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutineVersion-native-mt")
//Network
implementation("io.ktor:ktor-client-core:$ktorVersion")
implementation("io.ktor:ktor-client-serialization:$ktorVersion")
// JSON Serialization
implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion")
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion")
// client mock
implementation("io.ktor:ktor-client-mock:$ktorVersion")
// koru
implementation("com.futuremind:koru:0.11.1")
// firebase
implementation("dev.gitlive:firebase-auth:1.6.1")
}
}
val androidMain by getting {
dependencies {
//Network
implementation("io.ktor:ktor-client-okhttp:$ktorVersion")
}
}
val commonTest by getting {
dependencies {
implementation(kotlin("test-common"))
implementation(kotlin("test-annotations-common"))
}
}
val iosX64Main by getting
val iosArm64Main by getting
val iosSimulatorArm64Main by getting
val iosMain by creating {
dependsOn(commonMain)
iosX64Main.dependsOn(this)
iosArm64Main.dependsOn(this)
iosSimulatorArm64Main.dependsOn(this)
dependencies {
//Network
implementation("io.ktor:ktor-client-darwin:$ktorVersion")
}
}
}
}
android {
compileSdk = 31
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
defaultConfig {
minSdk = 27
targetSdk = 31
}
}
koru {
nativeSourceSetNames = listOf("iosMain")
}
Issue Analytics
- State:
- Created a year ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
KMM - Error Task 'embedAndSignAppleFrameworkForXcode ...
I built and ran it successfully on both devices: Android and iOS. After that, I re-ran the project on iOS. It had an...
Read more >embedAndSignAppleFramework...
I think embedAndSignAppleFrameworkForXcode is not supposed to run from the terminal as packForXCode used be. The proper way to run this task is...
Read more >Multiplatform Gradle Plugin Improved for Connecting KMM ...
It allows you to create a KMM project with a suitable iOS integration option – either the Cocoapods dependency manager or a regular...
Read more >KSP resolves classes that are not available to the app #198
The KSP processor checks for the availability of the javax.annotation.processing.Generated class and adds that annotation if available.
Read more >Hey all could somebody assist me with running my Multiplatfo
It seems to run using the simulator, but I keep getting this: ld: framework not found Pods_iosApp clang: error: linker command failed with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
gradlew runs when build with Xcode, so it may be affected
I assume that kapt working and ksp not for your setup has something to do with the gradle task that you use. In the example repo I build xcframework with
gradle assembleXCFramework
and it seems to pick up the ksp step.gradle shared:build
orgradle shared:assemble
should be fine, too.The code looks fine to me. Not sure how
operator fun
will behave, but if kapt works, ksp will probably, too. Will add tests for that, too.