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
I'm trying to get annotations with ksp working in an Android/iOS multiplatform project using the "Framework"-style Xcode integration.
I assume because proper common codegen support is lacking from ksp, this example uses the trick of adding the android generated code to the common source set, to make the generated symbols accessible from common code (in this case, the .module extension property on @Module annotated classes):
I'm using this setup in my project with the only difference being that I have only the iosArm64 and iosX64 targets for iOS (which I figure doesn't make a difference here).
This works fine for Android, but in my case leads to an overload resolution ambiguity when gradle attempts to build the framework, since both the compiler/ksp generated code for the specific iOS source set as well as the explicitly added symbols for Android are visible:
I'm trying to get annotations with ksp working in an Android/iOS multiplatform project using the "Framework"-style Xcode integration.
I assume because proper common codegen support is lacking from ksp, this example uses the trick of adding the android generated code to the common source set, to make the generated symbols accessible from common code (in this case, the
.module
extension property on@Module
annotated classes):hello-kmp/shared/build.gradle.kts
Line 35 in 6644448
I'm using this setup in my project with the only difference being that I have only the iosArm64 and iosX64 targets for iOS (which I figure doesn't make a difference here).
This works fine for Android, but in my case leads to an overload resolution ambiguity when gradle attempts to build the framework, since both the compiler/ksp generated code for the specific iOS source set as well as the explicitly added symbols for Android are visible:
Mapping back to this example (annotations branch), the above error would refer to the following line:
hello-kmp/shared/src/commonMain/kotlin/com/example/helloworldkmp/di/AppModule.kt
Line 7 in 6644448
Do you see a way to resolve this that does not involve having to do Koin initialization separately in androidMain, iosMain etc. source sets?
The text was updated successfully, but these errors were encountered: