InsertKoinIO / koin-annotations

Koin Annotations - About Koin - a pragmatic lightweight dependency injection framework for Kotlin & Kotlin Multiplatform insert-koin.io
https://insert-koin.io
Apache License 2.0
159 stars 42 forks source link

The Library incorrectly generates files for a multi-platform project #19

Closed DoTheMonkeyBusiness closed 2 years ago

DoTheMonkeyBusiness commented 2 years ago

Describe the bug Highlighting in Android Studio doesn't work when using generated resources in a multi-platform project

To Reproduce Steps to reproduce the behavior:

  1. Add koin-annotations to a multiplatform project.
  2. Add all necessary modules.
  3. Try to register modules.
  4. See error

Expected behavior Highlighting in Android Studio works as expected.

Actual behavior Highlighting in Android Studio doesn't work as expected.

This happens because when I add generated platform folders to srcDir, Android Studio still expects the common path: I add kotlin.srcDir("build/generated/ksp/android/androidDebug/kotlin") for android and kotlin.srcDir("build/generated/ksp/desktop/desktopMain/kotlin") for desktop

And Adnroid studio sees them:

image

But still doesn't see generated code from common code:

image

Important I can build the project, this issue affects only visual representation.

koin-core version 3.2.0-beta-1 koin-annotations version 1.0.0-beta-2

Additional Sample code: https://github.com/DoTheMonkeyBusiness/koinAnnotationIssue/tree/multiplatform_exception

arnaudgiuliani commented 2 years ago

The issue is duplicated