https://kotlinlang.org logo
Title
p

pabl0rg

11/14/2019, 3:50 PM
Hi Gradle connaisseurs. I have defined (in kts) a project as depending on another project in this way:
dependencies {
     implementation(project(":ecommerceApi"))
}
But when I run
gradlew -p mainproj check
, gradle tries to build this project before the one upon which i declared a dependency, and build fails with
Unresolved reference: ecommerceApi
.
g

gildor

11/14/2019, 4:13 PM
Unresolved reference? It doesn't look as problem of this dependency declaration
p

pabl0rg

11/15/2019, 10:30 PM
Gradle does compile the :ecommerceApi sub-project (i can see
> Task :ecommerceApi:compileKotlin UP-TO-DATE
in the output), but at a later point, it spits out the unresolved reference error.
Also, the build works fine on a colleague's computer and on our CI server, just not on mine.
g

gildor

11/16/2019, 9:06 AM
Do you have stacktrace?
Strange thing that "unresolved reference" sounds as some exception during compilation rather than build configuration
If it doesn't work on your machine only, maybe some caches, have you tried to build with --rerun-tasks
p

pabl0rg

11/18/2019, 10:13 PM
thank you! that was the solution (--rerun-tasks)