Just met a behaviour that I don’t understand. I ha...
# announcements
s
Just met a behaviour that I don’t understand. I have a multi-module project, let’s say: A, B, C. The dependency between them is:  • A - doesn’t depend on other modules, • B - depends on A • C - depends on A and B In A and B modules I use some lib, for ex: Koin. To add this lib, I should add the next lines to each module’s gradle file:
Copy code
repositories {
   jcenter()
   maven { url = uri("<https://dl.bintray.com/ekito/koin>") }
}
and 
Copy code
dependencies {
      implementation("org.koin:koin-core:3.0.0-alpha-4")
}
I’m ok with that, but the thing I don’t understand, why I have to add a repository block to C module as well, while I don’t have a dependency on that lib in C module? Thank you in advance.
i
You still have a dependency in C on that library, but it's not an implementation dependency but rather a runtime dependency. I.e. it isn't needed during C's compilation time, but is needed at C's run time.
a
Module C can't resolve the transitive dependency of A and B (koin-core in this case). Gradle makes sure that all dependencies (include transitive ones) are resolvable.
s
Aha, ok, got it. Thank you both 👍