:wave::sos: Im trying to publish a library which ...
# koin
r
👋🆘 Im trying to publish a library which depends on Koin (koin-bom, koin-core and koin-compose-viewmodel). The publish seems right, but when I consumed the lib, I got this error
Copy code
No matching variant of io.insert-koin:koin-bom:4.1.0-Beta5 was found. The consumer was configured to find a library for use during runtime (...)
If I exclude the
koin-bom
transitive dependency it works Here is the library https://github.com/LunabeeStudio/Lunabee_Compose_Android/tree/feature/presenter-koin/lbcpresenter/lbcpresenter-koin And the published snapshot https://s01.oss.sonatype.org/content/repositories/snapshots/studio/lunabee/compose/lbcpresenter-koin/1.4.0-alpha-363-presenter-koin-SNAPSHOT/ The library also use the Compose bom without error.
Copy code
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve io.insert-koin:koin-bom:4.1.0-Beta5.
     Required by:
         project :app > studio.lunabee.compose:lbcpresenter-koin:1.4.0-alpha-363-presenter-koin-SNAPSHOT:20250320.082307-1
      > No matching variant of io.insert-koin:koin-bom:4.1.0-Beta5 was found. The consumer was configured to find a library for use during runtime, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.AgpVersionAttr' with value '8.9.0', attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
          - Variant 'apiElements':
              - Incompatible because this component declares a platform for use during compile-time and the consumer needed a library for use during runtime
              - Other compatible attributes:
                  - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '8.9.0')
                  - Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
                  - Doesn't say anything about its target Java environment (preferred optimized for Android)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
          - Variant 'enforcedApiElements':
              - Incompatible because this component declares an enforced platform for use during compile-time and the consumer needed a library for use during runtime
              - Other compatible attributes:
                  - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '8.9.0')
                  - Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
                  - Doesn't say anything about its target Java environment (preferred optimized for Android)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
          - Variant 'enforcedRuntimeElements' declares a component for use during runtime:
              - Incompatible because this component declares an enforced platform and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '8.9.0')
                  - Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
                  - Doesn't say anything about its target Java environment (preferred optimized for Android)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
          - Variant 'runtimeElements' declares a component for use during runtime:
              - Incompatible because this component declares a platform and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about com.android.build.api.attributes.AgpVersionAttr (required '8.9.0')
                  - Doesn't say anything about com.android.build.api.attributes.BuildTypeAttr (required 'debug')
                  - Doesn't say anything about its target Java environment (preferred optimized for Android)
                  - Doesn't say anything about org.jetbrains.kotlin.platform.type (required 'androidJvm')
p
• How are you creating the library POM.xml ? • What happens if you specify each dependency directly with using the BOM? • What if you include the BOM dependency in the App? - with the 3 libraries too
a
Try to use api(koin) instead of implementation(koin) in gradle
In the build.gradle of your library