Describe the bug
I want to set up Koin as my DI library for my Kotlin Multiplatform project. After I add the dependencies I can't build the project and the error is Could not find org.koin:koin-core-jvm:3.0.0-alpha-4
Steps To Reproduce:
Expected behavior
Ability to build the project and use Koin in shared, Android and iOS codebases.
Koin project used and used version: koin-core 3.0.0-alpha-4
Additional moduleDefinition
Here is my root build.gradle.kts buildscript
repositories {
gradlePluginPortal()
jcenter()
google()
mavenCentral()
maven(url = "https://dl.bintray.com/ekito/koin")
}
And I added the dependency in commonMain sourceSets for the shared module I have
implementation("org.koin:koin-core:3.0.0-alpha-4")
While trying to build the project I get
Execution failed for task ':androidApp:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':androidApp:debugRuntimeClasspath'.
> Could not find org.koin:koin-core-jvm:3.0.0-alpha-4.
Searched in the following locations:
- https://plugins.gradle.org/m2/org/koin/koin-core-jvm/3.0.0-alpha-4/koin-core-jvm-3.0.0-alpha-4.pom
- https://dl.google.com/dl/android/maven2/org/koin/koin-core-jvm/3.0.0-alpha-4/koin-core-jvm-3.0.0-alpha-4.pom
- https://jcenter.bintray.com/org/koin/koin-core-jvm/3.0.0-alpha-4/koin-core-jvm-3.0.0-alpha-4.pom
- https://repo.maven.apache.org/maven2/org/koin/koin-core-jvm/3.0.0-alpha-4/koin-core-jvm-3.0.0-alpha-4.pom
Required by:
project :androidApp > project :shared > org.koin:koin-core:3.0.0-alpha-4
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
It looks to me like the jvm version of the library is not released, and also I don't understand why my core library depends on the jvm library. Am I doing something wrong?
The issue was on my side, but in my defense, the https://doc.insert-koin.io/#/setup/koin_mp could have this information written in it 馃槃
Long story short I added maven(url = "https://dl.bintray.com/ekito/koin") to buildscript.repositories but should've added it to allprojects.repositories.
Closing the issue.
I have this issue too.
@petarmarijanovicfive Where exactly did you add the custom maven repository?
I added maven(url = "https://dl.bintray.com/ekito/koin") in:
build.gradle.kts in buildscript.repositories and in repositories blocksbuild.gradle.kts in the repositories blockI'm using the 3.0.0-alpha-4.
And still I get:
Execution failed for task ':tbellAndroid:dataBindingMergeDependencyArtifactsDebug'.
> Could not resolve all files for configuration ':tbellAndroid:debugRuntimeClasspath'.
> Could not find org.koin:koin-core-jvm:3.0.0-alpha-4.
Searched in the following locations:
- https://plugins.gradle.org/m2/org/koin/koin-core-jvm/3.0.0-alpha-4/koin-core-jvm-3.0.0-alpha-4.pom
- https://dl.google.com/dl/android/maven2/org/koin/koin-core-jvm/3.0.0-alpha-4/koin-core-jvm-3.0.0-alpha-4.pom
- https://jcenter.bintray.com/org/koin/koin-core-jvm/3.0.0-alpha-4/koin-core-jvm-3.0.0-alpha-4.pom
- https://repo.maven.apache.org/maven2/org/koin/koin-core-jvm/3.0.0-alpha-4/koin-core-jvm-3.0.0-alpha-4.pom
Required by:
project :tbellAndroid > project :shared > org.koin:koin-core:3.0.0-alpha-4
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
@azurh
You need to put maven(url = "https://dl.bintray.com/ekito/koin") in allProjects.repositories in the top level build.gradle.kts
buildscript {
repositories {
gradlePluginPortal()
jcenter()
google()
mavenCentral()
}
dependencies {
classpath(kotlin("gradle-plugin", Versions.kotlin))
classpath(kotlin("serialization", Versions.kotlin))
classpath("com.android.tools.build:gradle:4.1.0")
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven(url = "https://dl.bintray.com/ekito/koin")
}
}
repositories {
mavenCentral()
}
I've faced bizarre behavior.
If I add maven(url = "https://dl.bintray.com/ekito/koin") kmm's folders desappear (screenshots below)
What can be the cause of this behavior?


Most helpful comment
@azurh
You need to put
maven(url = "https://dl.bintray.com/ekito/koin")inallProjects.repositoriesin the top levelbuild.gradle.kts